Part Number Hot Search : 
NE68700 AG2130 XC68HC11 SB105 EA61FC2 BAW56 030406 102M2
Product Description
Full Text Search
 

To Download XR88C681P40-F Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  x r 8 8 c 6 8 1 c m o s d u a l c h a n n e l u a r t ( d u a r t ) r e v . 2 . 1 1 e 2 0 0 6 j u n e 2 0 0 6 f e a t u r e s d t w o f u l l d u p l e x , i n d e p e n d e n t c h a n n e l s d a s y n c h r o n o u s r e c e i v e r a n d t r a n s m i t t e r d q u a d r u p l e - b u f f e r e d r e c e i v e r s a n d d u a l b u f f e r e d t r a n s m i t t e r s d p r o g r a m m a b l e s t o p b i t s i n 1 / 1 6 b i t i n c r e m e n t s d i n t e r n a l b i t r a t e g e n e r a t o r s w i t h m o r e t h a n 2 3 b i t r a t e s d i n d e p e n d e n t b i t r a t e s e l e c t i o n f o r e a c h t r a n s m i t t e r a n d r e c e i v e r d e x t e r n a l c l o c k c a p a b i l i t y d m a x i m u m b i t r a t e : 1 x c l o c k - 1 m b / s , 1 6 x c l o c k - 1 2 5 k b / s d n o r m a l , a u t o e c h o , l o c a l l o o p b a c k a n d r e m o t e l o o p b a c k m o d e s d m u l t i - f u n c t i o n 1 6 b i t c o u n t e r / t i m e r d i n t e r r u p t o u t p u t w i t h e i g h t m a s k a b l e i n t e r r u p t c o n d i t i o n s d i n t e r r u p t v e c t o r o u t p u t o n a c k n o w l e d g e ( 4 0 p i n d i p a n d 4 4 p i n p l c c p a c k a g e s o n l y ) d p r o g r a m m a b l e i n t e r r u p t d a i s y c h a i n d 8 g e n e r a l p u r p o s e o u t p u t s ( 4 0 p i n d i p a n d 4 4 p i n p l c c p a c k a g e s o n l y ) d 7 g e n e r a l p u r p o s e i n p u t s w i t h c h a n g e o f s t a t e s d e t e c t o r s o n i n p u t s ( 4 0 p i n d i p a n d 4 4 p i n p l c c p a c k a g e s o n l y ) d m u l t i - d r o p m o d e c o m p a t i b l e w i t h 8 0 5 1 n i n e b i t m o d e d o n - c h i p o s c i l l a t o r f o r c r y s t a l d s t a n d b y m o d e t o r e d u c e o p e r a t i n g p o w e r d c o m p a t i b l e w i t h t h e m o t o r o l a m c 2 6 8 1 a n d s i g n e t i c s s c c 2 6 9 2 d e v i c e s d a d v a n c e d c m o s l o w p o w e r t e c h n o l o g y a p p l i c a t i o n s d m u l t i m e d i a s y s t e m s d s e r i a l t o p a r a l l e l / p a r a l l e l t o s e r i a l c o n v e r t e r d d t e f o r m o d e m c o m m u n i c a t i o n s y s t e m s g e n e r a l d e s c r i p t i o n t h e e x a r d u a l u n i v e r s a l a s y n c h r o n o u s r e c e i v e r a n d t r a n s m i t t e r ( d u a r t ) i s a d a t a c o m m u n i c a t i o n s d e v i c e t h a t p r o v i d e s t w o f u l l y i n d e p e n d e n t f u l l d u p l e x a s y n c h r o n o u s c o m m u n i c a t i o n c h a n n e l s i n a s i n g l e p a c k a g e . t h e d u a r t i s d e s i g n e d f o r u s e i n m i c r o p r o c e s s o r b a s e d s y s t e m s a n d m a y b e u s e d i n a p o l l e d o r i n t e r r u p t d r i v e n e n v i r o n m e n t . t h e x r 8 8 c 6 8 1 d e v i c e o f f e r s a s i n g l e i c s o l u t i o n f o r t h e 8 0 8 0 / 8 5 , 8 0 8 6 / 8 8 , z 8 0 , z 8 0 0 0 , 6 8 x x a n d 6 5 x x m i c r o p r o c e s s o r f a m i l i e s . t h e d u a r t i s f a b r i c a t e d u s i n g a d v a n c e d t w o l a y e r m e t a l , w i t h a h i g h p e r f o r m a n c e d e n s i t y e p i / c m o s 1 . 8  p r o c e s s t o p r o v i d e h i g h p e r f o r m a n c e a n d l o w p o w e r c o n s u m p t i o n , a n d i s p a c k a g e d i n a 4 0 p i n p d i p , a 2 8 p i n p d i p , a n d a 4 4 p i n p l c c . o r d e r i n g i n f o r m a t i o n p a r t n o . p i n p a c k a g e o p e r a t i n g t e m p e r a t u r e r a n g e x r 8 8 c 6 8 1 c j 4 4 p l c c 0 c t o 7 0 c x r 8 8 c 6 8 1 c n / 4 0 4 0 c d i p 0 c t o 7 0 c x r 8 8 c 6 8 1 c p / 2 8 2 8 p d i p 0 c t o 7 0 c x r 8 8 c 6 8 1 c p / 4 0 4 0 p d i p 0 c t o 7 0 c x r 8 8 c 6 8 1 j 4 4 p l c c - 4 0 c t o + 8 5 c x r 8 8 c 6 8 1 n / 4 0 4 0 c d i p - 4 0 c t o + 8 5 c x r 8 8 c 6 8 1 p / 2 8 2 8 p d i p - 4 0 c t o + 8 5 c x r 8 8 c 6 8 1 p / 4 0 4 0 p d i p - 4 0 c t o + 8 5 c
x r 8 8 c 6 8 1 2 r e v . 2 . 1 1 c o m m a n d d e c o d e r b i t r a t e g e n e r a t o r t x d a r x d a i n t e r n a l d a t a b u s f i g u r e 1 . b l o c k d i a g r a m o f t h e x r 8 8 c 6 8 1 a d d r e s s d e c o d e r c r a c r b o p e r a t i o n c o n t r o l i n t e r r u p t c o n t r o l i s r i m r m i s r i v r c s r a c s r b c o u n t e r / t i m e r t i m i n g d a t a b u s b u f f e r d 0 - d 7 a 0 - a 3 - r d - w r - c s r e s e t i e i i e o - i a c k - i n t r x 1 / c l k x 2 c h a n g e o f s t a t e d e t e c t o r s i p r i p c r a c r i n p u t p o r t i p 0 - i p 6 t s r r s r t h r r h r m o d e r e g i s t e r s s t a t u s r e g i s t e r c h a n n e l b t x d b r x d b t s r r s r t h r r h r m o d e r e g i s t e r s s t a t u s r e g i s t e r c h a n n e l a o p r o u t p u t p o r t f u n c t i o n s e l e c t l o g i c o p c r o u t p u t p o r t o p 0 - o p 7 o s c i l l a t o r
x r 8 8 c 6 8 1 3 r e v . 2 . 1 1 p i n c o n f i g u r a t i o n v c c i p 2 - c s r e s e t x 2 x 1 / c l k r x d a t x d a a 0 a 1 1 3 a 2 1 6 a 3 1 4 - w r 1 5 - r d r x d b t x d b o p 0 o p 1 d 0 d 1 d 2 d 3 d 4 d 5 d 6 d 7 - i n t r g n d 2 8 l e a d p d i p ( 0 . 6 0 0 ? ) 1 2 3 4 5 6 7 8 9 1 0 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 1 9 1 1 1 8 1 2 1 7 1 5 1 6 1 7 1 8 1 9 2 0 2 6 2 5 2 4 2 3 2 2 2 1 1 2 3 4 5 6 7 8 9 1 0 4 0 3 9 3 8 3 7 3 6 3 5 3 4 3 3 3 2 3 1 1 1 1 2 1 3 1 4 3 0 2 9 2 8 2 7 4 0 l e a d p d i p , c d i p ( 0 . 6 0 0 ? ) d 4 d 6 - i n t r o p 6 d 0 d 2 o p 0 o p 2 o p 4 x 1 / c l k r x d a t x d a x 2 i p 2 - c s r e s e t i p 4 / i e i i p 5 / i e o - i p 6 / i a c k v c c d 5 d 7 g n d o p 7 d 1 d 3 o p 1 o p 3 o p 5 - r d r x d b t x d b - w r a 2 a 3 i p 0 i p 3 a 1 i p 1 a 0 x r - 6 8 c 6 8 1 c j p l c c c s - r e s e t x 2 x 1 / c l k r x d a n c t x d a o p 0 o p 2 o p 4 o p 5 o p 3 o p 1 t x d b n c r x d b - r d - w r i p 0 a 3 4 4 l e a d p l c c o p 7 o p 6 a 2 i p 1 a 1 i p 3 a 0 n c v c c i p 4 / i e i i p 5 / i e o - i p 6 / i a c k i p 2 d 3 d 5 d 7 g n d n c - i n t r d 4 d 2 d 0 d 1 d 6 3 9 3 8 3 7 3 6 3 5 3 4 3 3 3 2 3 1 3 0 2 9 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 0 2 1 2 2 2 3 2 4 2 5 2 6 2 7 2 8 1 2 3 4 5 6 4 4 4 3 4 2 4 1 4 0
x r 8 8 c 6 8 1 4 r e v . 2 . 1 1 p i n d e s c r i p t i o n 4 4 p l c c 4 0 p d i p , c d i p 2 8 p d i p s y m b o l t y p e d e s c r i p t i o n 1 n c n o c o n n e c t i o n . 2 1 1 a 0 i l s b o f a d d r e s s i n p u t . t h i s i n p u t , a l o n g w i t h a d d r e s s i n p u t s , a 1 - a 3 a r e u s e d t o s e l e c t c e r t a i n r e g i s t e r s w i t h i n t h e d u a r t d e v i c e , d u r i n g r e a d a n d w r i t e o p e r a t i o n s w i t h t h e c p u . 3 2 i p 3 ( t x c a - i ) ( r x c a - z ) i i n p u t p o r t 3 . g e n e r a l p u r p o s e i n p u t - w h e n t h e d u a r t i s o p e r a t i n g i n t h e i - m o d e , t h i s i n p u t c a n a l s o b e u s e d a s t h e e x t e r n a l c l o c k i n p u t f o r t h e c h a n n e l a t r a n s m i t t e r ( t x c a ) . w h e n t h e d u a r t i s o p e r a t i n g i n t h e z - m o d e , t h i s i n p u t c a n b e u s e d a s t h e e x t e r n a l c l o c k i n p u t f o r t h e c h a n n e l a r e c e i v - e r ( r x c a ) . 4 3 2 a 1 i a d d r e s s i n p u t . 5 4 i p 1 ( - c t s b ) i i n p u t p o r t 1 . g e n e r a l p u r p o s e i n p u t - t h i s i n p u t c a n a l s o b e u s e d a s t h e a c t i v e l o w , ? c h a n n e l b c l e a r t o s e n d ? i n p u t . ( - c t s b ) 6 5 3 a 2 i a d d r e s s i n p u t . 7 6 4 a 3 i m s b o f a d d r e s s i n p u t . t h i s i n p u t , a l o n g w i t h a d d r e s s i n - p u t s , a 0 - a 2 a r e u s e d t o s e l e c t c e r t a i n r e g i s t e r s w i t h i n t h e d u a r t d e v i c e , d u r i n g r e a d a n d w r i t e o p e r a t i o n s w i t h t h e c p u . 8 7 i p 0 ( - c t s a ) i i n p u t 0 . g e n e r a l p u r p o s e i n p u t - t h i s i n p u t c a n a l s o b e u s e d a s t h e a c t i v e - l o w , ? c h a n n e l a c l e a r - t o - s e n d ? i n p u t . ( - c t s a ) 9 8 5 - w r i w r i t e s t r o b e ( a c t i v e - l o w ) . a ? l o w ? o n t h i s i n p u t w h i l e - c s i s a l s o ? l o w ? w r i t e s t h e c o n t e n t s o f t h e d a t a b u s i n t o t h e a d - d r e s s e d r e g i s t e r , w i t h i n t h e d u a r t . t h e t r a n s f e r o c c u r s o n t h e r i s i n g e d g e o f - w r . 1 0 9 6 - r d i r e a d s t r o b e ( a c t i v e l o w ) . a ? l o w ? o n t h i s i n p u t w h i l e - c s i s a l s o ? l o w ? p l a c e s t h e c o n t e n t s o f t h e a d d r e s s e d d u a r t r e g i s - t e r , o n t h e d a t a b u s . 1 1 1 0 7 r x d b i r e c e i v e s e r i a l d a t a i n p u t ( c h a n n e l b ) . t h e l e a s t s i g n i f i c a n t b i t o f t h e c h a r a c t e r i s r e c e i v e d f i r s t . i f e x t e r n a l r e c e i v e r c l o c k , r x c b , i s s p e c i f i e d , t h e d a t a i s s a m p l e d o n t h e r i s i n g e d g e o f t h i s c l o c k . 1 2 n c n o c o n n e c t . 1 3 1 1 8 t x d b o t r a n s m i t t e r s e r i a l d a t a o u t p u t ( c h a n n e l b ) . t h e l e a s t s i g - n i f i c a n t b i t o f t h e c h a r a c t e r i s t r a n s m i t t e d f i r s t . t h i s o u t p u t i s h e l d i n t h e h i g h ( m a r k i n g s t a t e ) w h e n t h e t r a n s m i t t e r i s i d l e , d i s a b l e d , o r w h e n t h e c h a n n e l i s o p e r a t i n g i n t h e l o c a l l o o p - b a c k m o d e . i f a n e x t e r n a l t r a n s m i t t e r c l o c k i s s p e c i f i e d , t x c b , t h e t r a n s m i t t e d d a t a i s s h i f t e d o u t o f t h e t s r ( t r a n s - m i t t e r s h i f t r e g i s t e r ) o n t h e f a l l i n g t h e e d g e o f t h i s c l o c k .
x r 8 8 c 6 8 1 5 r e v . 2 . 1 1 4 4 p l c c 4 0 p d i p , c d i p 2 8 p d i p s y m b o l t y p e d e s c r i p t i o n 1 4 1 2 9 o p 1 ( - r t s b ) o o u t p u t 1 ( g e n e r a l p u r p o s e o u t p u t ) . t h i s o u t p u t c a n a l s o b e p r o g r a m m e d t o f u n c t i o n a s t h e a c t i v e - l o w , ? c h a n n e l b r e q u e s t - t o - s e n d ? o u t p u t ( - r t s b ) . 1 5 1 3 o p 3 ( t x c b _ 1 x ) ( r x c b _ 1 x ) ( - c / t _ r d y ) o o u t p u t 3 ( g e n e r a l p u r p o s e o u t p u t ) . t h i s o u t p u t p o r t c a n a l s o b e p r o g r a m m e d t o f u n c t i o n a s : t h e ? c h a n n e l b t r a n s - m i t t e r 1 x c l o c k ? o u t p u t ( t x c b _ 1 x ) , t h e ? c h a n n e l b r e c e i v - e r 1 x c l o c k ? o u t p u t ( r x c b _ 1 x ) , o r t h e o p e n d r a i n , a c t i v e - l o w ? c o u n t e r / t i m e r r e a d y ? o u t p u t ( - c / t _ r d y ) . 1 6 1 4 o p 5 ( - r x r d y / - f f u l l _ b ) o o u t p u t 5 ( g e n e r a l p u r p o s e o u t p u t p i n ) . t h i s o u t p u t p o r t p i n c a n a l s o b e p r o g r a m m e d t o f u n c t i o n a s t h e o p e n - d r a i n , a c t i v e - l o w , c h a n n e l b ? r e c e i v e r e a d y ? o r ? r e c e i v e r f i f o f u l l ? i n d i c a t o r o u t p u t ( - r x r d y _ b / - f f u l l _ b ) . 1 7 1 5 o p 7 ( t x r d y _ b ) o o u t p u t 7 . ( g e n e r a l p u r p o s e o u t p u t p i n ) . t h i s o u t p u t p o r t p i n c a n a l s o b e p r o g r a m m e d t o f u n c t i o n a s t h e o p e n - d r a i n , a c t i v e - l o w , ? t r a n s m i t t e r r e a d y ? i n d i c a t o r o u t p u t f o r c h a n n e l b ( - t x r d y _ b ) . 1 8 1 6 1 0 d 1 i / o b i - d i r e c t i o n a l d a t a b u s . 1 9 1 7 1 1 d 3 i / o b i - d i r e c t i o n a l d a t a b u s . 2 0 1 8 1 2 d 5 i / o b i - d i r e c t i o n a l d a t a b u s . 2 1 1 9 1 3 d 7 i / o m s b o f t h e e i g h t b i t b i - d i r e c t i o n a l d a t a b u s . a l l t r a n s f e r s b e t w e e n t h e c p u a n d t h e d u a r t t a k e p l a c e o v e r t h i s b u s ( c o n s i s t i n g o f p i n s d 0 - d 7 ) . t h e b u s i s t r i - s t a t e d w h e n t h e - c s i n p u t i s ? h i g h ? , e x c e p t d u r i n g a n i a c k c y c l e ( i n t h e z - m o d e ) . 2 2 2 0 1 4 g n d p w r s i g n a l g r o u n d . 2 3 n c n o c o n n e c t . 2 4 2 1 1 5 - i n t r o i n t e r r u p t r e q u e s t o u t p u t ( a c t i v e l o w , o p e n d r a i n ) . - i n t r i s a s s e r t e d u p o n t h e o c c u r r e n c e o f o n e o r m o r e o f t h e c h i p ? s m a s k a b l e i n t e r r u p t i n g c o n d i t i o n s . t h i s s i g n a l w i l l r e - m a i n a s s e r t e d t h r o u g h o u t t h e i n t e r r u p t s e r v i c e r o u t i n e a n d w i l l b e n e g a t e d o n c e t h e c o n d i t i o n ( s ) c a u s i n g t h e i n t e r r u p t r e q u e s t h a s b e e n e l i m i n a t e d . 2 5 2 2 1 6 d 6 i / o b i - d i r e c t i o n a l d a t a b u s . 2 6 2 3 1 7 d 4 i / o b i - d i r e c t i o n a l d a t a b u s . 2 7 2 4 1 8 d 2 i / o b i - d i r e c t i o n a l d a t a b u s . 2 8 2 5 1 9 d 0 i / o l s b o f t h e e i g h t b i t b i - d i r e c t i o n a l d a t a b u s . a l l t r a n s f e r s b e t w e e n t h e c p u a n d t h e d u a r t t a k e p l a c e o v e r t h i s b u s . t h e b u s i s t r i - s t a t e d w h e n t h e - c s i n p u t i s ? h i g h ? , e x c e p t d u r i n g a n i a c k c y c l e ( i n t h e z - m o d e ) . 2 9 2 6 o p 6 ( - t x r d y _ a ) o o u t p u t 6 ( g e n e r a l p u r p o s e o u t p u t ) . t h i s o u t p u t p i n c a n a l s o b e p r o g r a m m e d t o f u n c t i o n a s t h e o p e n d r a i n , a c t i v e - l o w , ? t r a n s m i t t e r r e a d y ? i n d i c a t o r o u t p u t f o r c h a n n e l a ( - t x r d y _ a ) .
x r 8 8 c 6 8 1 6 r e v . 2 . 1 1 4 4 p l c c 4 0 p d i p , c d i p 2 8 p d i p s y m b o l t y p e d e s c r i p t i o n 3 0 2 7 o p 4 ( r x r d y / f f u l l _ a ) o o u t p u t 4 ( g e n e r a l p u r p o s e o u t p u t ) . t h i s o u t p u t p i n c a n a l s o b e p r o g r a m m e d t o f u n c t i o n a s t h e o p e n - d r a i n , a c t i v e - l o w , ? r e c e i v e r r e a d y ? o r ? f i f o f u l l ? i n d i c a t o r o u t p u t f o r c h a n n e l a . ( - r x r d y _ a / - f f u l l _ a ) 3 1 2 8 o p 2 ( t x c a _ 1 6 ) ( t x c a - 1 x ) ( r x c a _ 1 x ) o o u t p u t 2 ( g e n e r a l p u r p o s e o u t p u t ) . t h i s o u t p u t p i n c a n a l s o b e p r o g r a m m e d t o f u n c t i o n a s a n y o f t h e f o l - l o w i n g : t h e c h a n n e l a t r a n s m i t t e r 1 6 x o r 1 x c l o c k o u t p u t ( t x c a _ 1 6 x o r t x c a _ 1 x ) , o r t h e c h a n n e l a r e c e i v e r 1 x c l o c k o u t p u t ( r x c a _ 1 x ) . 3 2 2 9 2 0 o p 0 ( - r t s a ) o o u t p u t 0 ( g e n e r a l p u r p o s e o u t p u t ) . t h i s o u t p u t p i n c a n a l s o b e p r o g r a m m e d t o f u n c t i o n a s t h e a c t i v e - l o w , r e q u e s t - t o - s e n d o u t p u t f o r c h a n n e l a ( - r t s a ) . 3 3 3 0 2 1 t x d a o t r a n s m i t t e r s e r i a l d a t a o u t p u t ( c h a n n e l a ) . t h e l e a s t s i g n i f i c a n t b i t o f t h e c h a r a c t e r i s t r a n s m i t t e d f i r s t . t h i s o u t p u t i s h e l d i n t h e m a r k i n g ( h i g h ) s t a t e w h e n t h e t r a n s m i t t e r i s i d l e , d i s a b l e d , o r o p e r a t i n g i n t h e l o c a l l o o p b a c k m o d e . i f a n e x t e r n a l t r a n s m i t t e r c l o c k i s s p e c i f i e d , t x c a , t h e d a t a i s s h i f t e d o u t o f t h e t s r ( t r a n s m i t t e r s h i f t r e g i s t e r ) o n t h e f a l l i n g t h e e d g e o f t h e c l o c k . 3 4 n c n o c o n n e c t . 3 5 3 1 2 2 r x d a i r e c e i v e s e r i a l d a t a i n p u t ( c h a n n e l a ) . t h e l e a s t s i g n i f i c a n t b i t o f t h e c h a r a c t e r i s r e c e i v e d f i r s t . i f a n e x t e r n a l r e c e i v e r c l o c k , r x c a , i s s p e c i f i e d , t h e d a t a i s s a m p l e d o n t h e r i s i n g e d g e o f t h e c l o c k . 3 6 3 2 2 3 x 1 / c l k i c r y s t a l o u t p u t o f e x t e r n a l c l o c k i n p u t . t h i s p i n i s t h e c o n n e c t i o n f o r o n e s i d e o f t h e c r y s t a l a n d a c a p a c i - t o r t o g r o u n d w h e n t h e i n t e r n a l o s c i l l a t o r i s u s e d . i f t h e o s c i l l a t o r i s n o t u s e d , a n e x t e r n a l c l o c k s i g n a l m u s t b e s u p p l i e d a t t h i s i n p u t . i n o r d e r f o r t h e x r 8 8 c 6 8 1 d e v i c e t o f u n c t i o n p r o p e r l y , t h e u s e r m u s t s u p p l y a s i g n a l w i t h f r e q u e n c i e s b e - t w e e n 2 . 0 m h z a n d 4 . 0 m h z . t h i s r e q u i r e m e n t c a n b e m e t b y e i t h e r a c r y s t a l o s c i l l a t o r o r b y t h e e x t e r n a l t t l - c o m p a t i b l e c l o c k s i g n a l . 3 7 3 3 2 4 x 2 o c r y s t a l i n p u t . c o n n e c t i o n f o r t h e o n e s i d e o f t h e c r y s - t a l ( o p p o s i t e o f x 1 / c l k ) . i f t h e o s c i l l a t o r i s u s e d , a c a p a c i t o r m u s t a l s o b e c o n n e c t e d f r o m t h i s p i n t o g r o u n d . t h i s p i n m u s t b e l e f t o p e n i f a n e x t e r n a l c l o c k i s s u p p l i e d a t x 1 / c l k .
x r 8 8 c 6 8 1 7 r e v . 2 . 1 1 4 4 p l c c 4 0 p d i p , c d i p 2 8 p d i p s y m b o l t y p e d e s c r i p t i o n 3 8 3 4 2 5 r e s e t i m a s t e r r e s e t ( a c t i v e h i g h ) . a s s e r t i n g t h i s i n p u t c l e a r s i n - t e r n a l r e g i s t e r s , s r , i s r , i m r , o p r , o p c r , a n d i n i t i a l i z e s t h e i v r t o 0 f 1 6 . a s s e r t i n g t h i s i n p u t a l s o s t o p s t h e c o u n t e r / t i m e r , p u t s o p 0 - o p 7 i n t h e h i g h s t a t e , a n d p l a c e s b o t h s e r i a l c h a n n e l s i n t h e i n a c t i v e s t a t e w i t h t x d a a n d t x d b o u t p u t s m a r k i n g ( h i g h ) . 3 9 3 5 2 6 - c s i c h i p s e l e c t ( a c t i v e l o w ) . t h e d a t a b u s i s t r i - s t a t e d w h e n - c s i s ? h i g h . ? d a t a t r a n s f e r s b e t w e e n t h e c p u a n d t h e d u a r t v i a d 0 - d 7 a r e e n a b l e d w h e n - c s i s ? l o w ? . 4 0 3 6 2 7 i p 2 ( c / t _ e x ) i i n p u t 2 . ( g e n e r a l p u r p o s e i n p u t ) . t h i s i n p u t p i n c a n a l s o b e p r o g r a m m e d t o f u n c t i o n a s t h e ? c o u n t e r / t i m e r e x t e r n a l c l o c k ? i n p u t ( c / t _ e x ) . 4 1 3 7 i p 6 ( r x c b ) i i n p u t 6 ( i - m o d e ) . g e n e r a l p u r p o s e i n p u t p i n . t h i s i n p u t p i n c a n a l s o b e p r o g r a m m e d t o f u n c t i o n a s t h e e x t e r n a l r e c e i v - e r c l o c k f o r c h a n n e l b ( r x c b ) . 4 1 3 7 - i a c k i i n t e r r u p t a c k n o w l e d g e i n p u t ( z - m o d e ) . a c t i v e l o w . t h i s i n p u t i s t h e c p u ? s r e s p o n s e t o t h e i n t e r r u p t r e q u e s t i s s u e d b y t h e d u a r t d e v i c e . w h e n t h e c p u a s s e r t s t h i s i n p u t , i t i n d i c a t e s t h a t t h e d u a r t ? s i n t e r r u p t r e q u e s t i s a b o u t t o b e s e r v i c e d , a n d t h a t t h e v e r y n e x t c y c l e w i l l b e a n i n t e r - r u p t a c k n o w l e d g e c y c l e . t h e d u a r t w i l l r e s p o n d t o t h e c p u ? s i n t e r r u p t a c k n o w l e d g e b y p l a c i n g t h e c o n t e n t s o f t h e i n t e r r u p t v e c t o r r e g i s t e r ( i v r ) o n t h e d a t a b u s ( d 0 - d 7 ) . 4 2 3 8 i p 5 ( t x c b ) i i n p u t 5 ( i - m o d e ) . g e n e r a l p u r p o s e i n p u t p i n . t h i s p i n c a n a l s o b e c o n f i g u r e d t o f u n c t i o n a s t h e e x t e r n a l c l o c k i n p u t f o r t h e t r a n s m i t t e r o f c h a n n e l b ( t x c b ) . 4 2 3 8 i e o ( z - m o d e ) o i n t e r r u p t e n a b l e o u t p u t ( z - m o d e ) . a c t i v e h i g h . t h i s o u t p u t p i n i s n o r m a l l y ? h i g h ? . h o w e v e r , e i t h e r o f t h e f o l l o w i n g t w o c o n d i t i o n s c a n c a u s e t h i s o u t p u t p i n t o b e n e - g a t e d ( t o g g l e d ? l o w ? ) . 1 . i f t h e i e i ( i n t e r r u p t e n a b l e i n p u t ) p i n i s ? l o w ? . i f i e o i s ? l o w ? b e c a u s e o f t h e i e i p i n , i e o w i l l t o g g l e ? h i g h ? o n c e t h e i e i h a s t o g g l e d ? h i g h ? . 2 . t h e d u a r t h a s i s s u e d a n i n t e r r u p t r e q u e s t t o t h e c p u ( - i n t r p i n i s t o g g l e d ? l o w ? ) . i f i e o i s ? l o w ? b e c a u s e t h e d u a r t h a s r e q u e s t e d a n i n t e r r u p t , t h e n i e o w i l l r e m a i n ? l o w ? , t h r o u g h o u t t h e i n t e r r u p t s e r v i c e r o u t i n e , u n t i l t h e c p u h a s i n v o k e d t h e ? ? c o m m a n d . 4 3 3 9 i p 4 ( r x c a ) i i n p u t 4 ( i - m o d e ) . g e n e r a l p u r p o s e i n p u t p i n . t h i s i n p u t p i n c a n a l s o b e c o n f i g u r e d t o f u n c t i o n a s t h e e x t e r n a l c l o c k i n p u t f o r t h e r e c e i v e r o f c h a n n e l a ( r x c a ) . 4 3 3 9 i e i ( z - m o d e ) i i n t e r r u p t e n a b l e i n p u t ( z - m o d e ) . a c t i v e h i g h . i f t h i s a c t i v e - h i g h i n p u t i s a t a l o g i c ? h i g h ? , t h e d u a r t i s c a - p a b l e o f g e n e r a t i n g a l l n o n - m a s k e d i n t e r r u p t r e q u e s t s t o t h e c p u . i f t h i s i n p u t i s a t a l o g i c ? l o w ? , t h e d u a r t i s i n h i b i t e d f r o m g e n e r a t i n g a n y i n t e r r u p t r e q u e s t s t o t h e c p u . 4 4 4 0 2 8 v c c p w r m o s t p o s i t i v e p o w e r s u p p l y .
x r 8 8 c 6 8 1 8 r e v . 2 . 1 1 d c e l e c t r i c a l c h a r a c t e r i s t i c s 1 , 2 , 3 t e s t c o n d i t i o n s : t a = 0 - 7 0 c , v c c = 5 v | 5 % u n l e s s o t h e r w i s e s p e c i f i e d . s y m b o l p a r a m e t e r m i n . t y p . m a x . u n i t c o n d i t i o n s v i l i n p u t l o w v o l t a g e 0 . 5 0 . 8 v v i h i n p u t h i g h v o l t a g e 2 . 0 v c c v v i h i n p u t h i g h v o l t a g e ( m i l i t a r y ) 2 . 2 v t a = - 5 5 c t o 1 2 5 c v i h x 1 i n p u t h i g h v o l t a g e ( x 1 / c l k ) 4 . 0 v c c v v o l o u t p u t l o w v o l t a g e 0 . 4 v i o l = 2 . 4 m a v o h o u t p u t h i g h v o l t a g e 2 . 4 v i o h = - 4 0 0  a i i l i n p u t l e a k a g e c u r r e n t - 2 5 2 5  a v i n = 0 t o v c c i i l s e l s e l e c t p i n l e a k a g e c u r r e n t - 3 0 + 3 0  a v i n = 0 t o v c c i x 1 l x 1 i n p u t l o w c u r r e n t - 2 0  a v i n = 0 i x 2 l x 2 i n p u t l o w c u r r e n t - 7 m a i x i h x 1 i n p u t h i g h c u r r e n t 2 0  a v i n = v c c i x 2 h x 2 i n p u t h i g h c u r r e n t 2 0  a v i n = v c c i l l d a t a b u s t r i - s t a t e l e a k a g e c u r r e n t - 1 0 1 0  a v o = 0 t o v c c i o c o p e n d r a i n o u t p u t l e a k a g e c u r r e n t - 1 0 1 0  a v o = 0 t o v c c i c c a p o w e r s u p p l y c u r r e n t 4 6 1 5 m a a c t i v e m o d e i c c s p o w e r s u p p l y c u r r e n t 4 3 1 0 m a s t a n d b y m o d e n o t e s 1 . p a r a m e t e r s a r e v a l i d o v e r t h e s p e c i f i e d t e m p e r a t u r e a n d o p e r a t i n g s u p p l y r a n g e s . t y p i c a l v a l u e s a r e 2 5 c , v c c = 5 v a n d t y p i c a l p r o c e s s i n g p a r a m e t e r s . 2 . a l l v o l t a g e s a r e r e f e r e n c e d t o g r o u n d ( g n d ) . f o r t e s t i n g , i n p u t s i g n a l l e v e l s a r e 0 . 4 v a n d 2 . 4 v w i t h a t r a n s i t i o n t i m e o f 2 0 n s m a x i m u m . a l l t i m e m e a s u r e m e n t s a r e r e f e r e n c e d a t i n p u t v o l t a g e s o f 0 . 8 v a n d 2 . 0 v a s a p p r o p r i a t e . s e e f i g u r e 5 0 . 3 . f o r p r i m e g r a d e n , p , j , l , m , m l , v c c = 5 v + 1 0 % . 4 . m e a s u r e d o p e r a t i n g w i t h a 3 . 6 8 6 4 m h z c r y s t a l a n d w i t h a l l o u t p u t s o p e n .
x r 8 8 c 6 8 1 9 r e v . 2 . 1 1 a c e l e c t r i c a l c h a r a c t e r i s t i c s 1 , 2 , 3 t e s t c o n d i t i o n s : t a = 0 - 7 0 c , v c c = 5 v | 5 % u n l e s s o t h e r w i s e s p e c i f i e d . s y m b o l p a r a m e t e r m i n . t y p . m a x . u n i t c o n d i t i o n s r e s e t t i m i n g ( s e e f i g u r e 5 1 ) t r e s r e s e t p u l s e w i d t h 1 . 0  a x r 8 8 c 6 8 1 r e a d a n d w r i t e c y c l e t i m i n g ( f i g u r e 5 2 ) 4 t a s a 0 - a 3 s e t u p t i m e t o r d , w r l o w 1 0 n s t a h a 0 - a 3 h o l d t i m e f r o m r d , w r l o w 0 n s t c s c s s e t u p t i m e t o r d , w r l o w 0 n s t c h c s h o l d t i m e f r o m - r d , - w r h i g h 0 n s t r w - r d , - w r p u l s e w i d t h 2 2 5 n s t d d d a t a v a l i d f r o m - r d l o w 6 0 1 7 5 n s t d f d a t a b u s f l o a t i n g f r o m - r d h i g h 1 0 1 0 0 n s t d s d a t a s e t u p t i m e t o - w r h i g h 1 0 0 n s t d h d a t a h o l d t i m e f r o m - w r h i g h 5 n s t r w d h i g h t i m e b e t w e e n r e a d s a n d / o r w r i t e s 5 , 6 1 0 0 n s z - m o d e i n t e r r u p t c y c l e t i m i n g ( f i g u r e 5 3 ) t d i o i e o d e l a y t i m e f r o m i e i 1 0 0 n s t i a s - i a c k s e t u p t i m e t o - r d l o w 7 n s t i a h - i a c k h o l d t i m e f r o m - r d h i g h 0 n s t e i s i e i s e t u p t i m e t o r d l o w 5 0 n s t e o d i e o d e l a y t i m e f r o m - i n t r l o w 1 0 0 n s p o r t t i m i n g ( f i g u r e 5 4 ) 4 t p s p o r t i n p u t s e t u p t i m e t o - r d / - c s l o w 0 n s t p h p o r t i n p u t h o l d t i m e f r o m - r d / - c s h i g h 0 n s t p d p o r t o u t p u t v a l i d f r o m - w r / - c s h i g h 4 0 0 n s i n t e r r u p t o u t p u t t i m i n g ( f i g u r e 5 5 ) t i r - i n t r o r o p 3 - o p 7 w h e n u s e d a s i n t e r r u p t s h i g h f r o m : c l e a r o f i n t e r r u p t s s t a t u s b i t s i n i s r o r i p c r c l e a r o f i n t e r r u p t m a s k i n i m r 3 0 0 3 0 0 n s n s c l o c k t i m i n g ( f i g u r e 5 6 )
x r 8 8 c 6 8 1 1 0 r e v . 2 . 1 1 s y m b o l c o n d i t i o n s u n i t m a x . t y p . m i n . p a r a m e t e r t c l k x 1 / c l k ( e x t e r n a l ) h i g h o r l o w t i m e 1 0 0 n s t c l k x 1 / c l k c r y s t a l o r e x t e r n a l f r e q u e n c y 7 . 3 7 2 m h z
x r 8 8 c 6 8 1 1 1 r e v . 2 . 1 1 a c e l e c t r i c a l c h a r a c t e r i s t i c s 1 , 2 , 3 ( c o n t ? d ) t e s t c o n d i t i o n s : t a = 0 - 7 0 c , v c c = 5 v | 5 % u n l e s s o t h e r w i s e s p e c i f i e d . s y m b o l p a r a m e t e r m i n . t y p . m a x . u n i t c o n d i t i o n s c l o c k t i m i n g ( f i g u r e 5 6 ) ( c o n t ? d . ) t c t c c o u n t e r / t i m e r e x t e r n a l c l o c k h i g h o r l o w t i m e ( i p 2 ) 1 0 0 n s t c t c c o u n t e r / t i m e r e x t e r n a l c l o c k f r e q u e n c y 0 7 . 3 7 2 m h z t r t x r x c n a n d t x c n ( e x t e r n a l ) h i g h o r l o w t i m e 8 2 2 0 n s f r t x r x c n a n d t x c n ( e x t e r n a l ) f r e q u e n c y 1 6 x 1 x 0 0 1 6 . 0 1 . 0 m h z m h z t r a n s m i t t e r t i m i n g ( f i g u r e 5 7 ) t t x d t x d o u t p u t d e l a y - t x c ( e x t e r n a l ) l o w 3 5 0 n s t t c s t x d o u t p u t d e l a y - t x c ( i n t e r n a l ) o u t p u t l o w 1 5 0 n s t r x s r x d d a t a s e t u p t i m e t o r x c ( e x t e r n a l ) h i g h 2 4 0 n s t r x h r x d d a t a h o l d t i m e f r o m r x c ( e x t e r n a l ) h i g h 2 0 0 n s n o t e s 1 . p a r a m e t e r s a r e v a l i d o v e r t h e s p e c i f i e d t e m p e r a t u r e a n d o p e r a t i n g s u p p l y r a n g e s . t y p i c a l v a l u e s a r e 2 5 c , v c c = 5 v a n d t y p i c a l p r o c e s s i n g p a r a m e t e r s . 2 . a l l v o l t a g e s a r e r e f e r e n c e d t o g r o u n d ( g n d ) . f o r t e s t i n g , i n p u t s i g n a l l e v e l s a r e 0 . 4 v a n d 2 . 4 v w i t h a t r a n s i t i o n t i m e o f 2 0 n s m a x i m u m . a l l t i m e m e a s u r e m e n t s a r e r e f e r e n c e d a t i n p u t v o l t a g e s o f 0 . 8 v a n d 2 . 0 v a s a p p r o p r i a t e . s e e f i g u r e 5 0 . 3 . a c t e s t c o n d i t i o n s f o r o u t p u t s : c l = 5 0 p f , r l = 2 . 7 k  t o v c c . 4 . i f - c s i s u s e d a s t h e s t r o b i n g i n p u t , t h i s p a r a m e t e r d e f i n e s t h e m i n i m u m h i g h t i m e b e t w e e n - c s s . 5 . c o n s e c u t i v e w r i t e o p e r a t i o n s t o t h e s a m e r e g i s t e r r e q u i r e a t l e a s t t h r e e e d g e s o f t h e x 1 c l o c k b e t w e e n w r i t e s . 6 . t h i s s p e c i f i c a t i o n i m p o s e s a 6 m h z m a x i m u m 6 8 0 0 0 c l o c k f r e q u e n c y i f a r e a d o r w r i t e c y c l e f o l l o w s i m m e d i a t e l y a f t e r t h e p r e v i o u s r e a d o r w r i t e c y c l e . a h i g h e r 6 8 0 0 0 c l o c k c a n b e u s e d i f t h i s i s n o t t h e c a s e . 7 . t h i s s p e c i f i c a t i o n i m p o s e s a l o w e r b o u n d o n - c s a n d - i a c k l o w , g u a r a n t e e i n g t h a t t h e y w i l l b e l o w f o r a t l e a s t o n e c l k p e r i o d . 8 . t h e m i n i m u m h i g h t i m e m u s t b e a t l e a s t 1 . 5 t i m e s t h e x 1 / c l k p e r i o d a n d t h e m i n i m u m l o w t i m e m u s t b e a t l e a s t e q u a l t o t h e x 1 / c l k p e r i o d i f e i t h e r c h a n n e l ? s r e c e i v e r i s o p e r a t i n g i n e x t e r n a l 1 x c l o c k m o d e . s p e c i f i c a t i o n s a r e s u b j e c t t o c h a n g e w i t h o u t n o t i c e a b s o l u t e m a x i m u m r a t i n g s 1 d c s u p p l y v o l t a g e 7 v . . . . . . . . . . . . . . . . . . . . . . . . . . . s t o r a g e t e m p e r a t u r e - 6 5 c t o 1 5 0 c . . . . . . . . . . . . . a l l v o l t a g e s w i t h r e s p e c t t o g r o u n d 2 - 0 . 5 v t o + 7 v . . . . . . . . . . . . . . . . . . 1 . s t r e s s e s a b o v e t h o s e l i s t e d u n d e r t h e a b s o l u t e m a x i m u m r a t i n g s m a y c a u s e p e r m a n e n t d a m a g e t o t h e d e v i c e . t h i s i s a s t r e s s r a t - i n g o n l y , a n d f u n c t i o n a l o p e r a t i o n o f t h e d e v i c e a t t h e s e o r a n y o t h e r c o n d i t i o n s a b o v e t h o s e i n d i c a t e d i n t h e ? e l e c t r i c a l c h a r a c t e r i s - t i c s ? s e c t i o n o f t h i s s p e c i f i c a t i o n i s n o t i m p l i e d . e x p o s u r e t o a b s o l u t e m a x i m u m r a t i n g c o n d i t i o n s f o r e x t e n d e d p e r i o d s m a y a f f e c t d e v i c e r e l i a b i l i t y .
x r 8 8 c 6 8 1 1 2 r e v . 2 . 1 1 2 . t h i s p r o d u c t i n c l u d e s c i r c u i t r y s p e c i f i c a l l y d e s i g n e d f o r t h e p r o t e c t i o n o f i t s i n t e r n a l d e v i c e s f r o m d a m a g i n g e f f e c t s o f e x c e s s i v e s t a t - i c c h a r g e . n o n e t h e l e s s , i t i s s u g g e s t e d t h a t c o n v e n t i o n a l p r e c a u t i o n s b e t a k e n t o a v o i d a p p l y i n g a n y v o l t a g e l a r g e r t h a n t h e r a t e d m a x i m u m .
x r 8 8 c 6 8 1 1 3 r e v . 2 . 1 1 s y s t e m d e s c r i p t i o n t h e x r 8 8 c 6 8 1 c o n s i s t s o f t w o i n d e p e n d e n t , f u l l - d u p l e x c o m m u n i c a t i o n c h a n n e l s ; e a c h c o n s i s t i n g o f t h e i r o w n t r a n s m i t t e r a n d r e c e i v e r . e a c h c h a n n e l o f t h e d u a r t m a y b e i n d e p e n d e n t l y p r o g r a m m e d f o r o p e r a t i n g m o d e a n d d a t a f o r m a t . t h e d u a r t c a n i n t e r f a c e t o a w i d e r a n g e o f p r o c e s s o r s w i t h a m i n i m a l a m o u n t o f c o m p o n e n t s . t h e o p e r a t i n g s p e e d o f e a c h r e c e i v e r a n d t r a n s m i t t e r m a y b e s e l e c t e d f r o m o n e o f 2 3 i n t e r n a l l y g e n e r a t e d f i x e d b i t r a t e s , f r o m a c l o c k d e r i v e d f r o m a n i n t e r n a l c o u n t e r / t i m e r , o r f r o m a n e x t e r n a l l y s u p p l i e d 1 x o r 1 6 x c l o c k . t h e b i t r a t e g e n e r a t o r ( t h e s o u r c e o f t h e 2 3 d i f f e r e n t f i x e d b i t r a t e s ) c a n o p e r a t e d i r e c t l y f r o m a c r y s t a l c o n n e c t e d a c r o s s t w o p i n s o r f r o m a n e x t e r n a l c l o c k . t h e a b i l i t y t o i n d e p e n d e n t l y p r o g r a m t h e o p e r a t i n g s p e e d o f t h e r e c e i v e r a n d t r a n s m i t t e r o f e a c h c h a n n e l m a k e s t h e d u a r t a t t r a c t i v e f o r s p l i t s p e e d c h a n n e l a p p l i c a t i o n s s u c h a s c l u s t e r e d t e r m i n a l s y s t e m s . r e c e i v e r d a t a i s q u a d r u p l e d b u f f e r e d a n d t h e t r a n s m i t t e r d a t a i s d u a l - b u f f e r e d v i a o n - c h i p f i f o s i n o r d e r t o m i n i m i z e t h e r i s k o f r e c e i v e r o v e r r u n a n d t o r e d u c e o v e r h e a d i n i n t e r r u p t d r i v e n a p p l i c a t i o n s . t h e d u a r t a l s o p r o v i d e s a f l o w c o n t r o l c a p a b i l i t y t o i n h i b i t t r a n s m i s s i o n f r o m a r e m o t e d e v i c e w h e n t h e b u f f e r o f t h e r e c e i v i n g d u a r t i s f u l l , t h u s p r e v e n t i n g l o s s o f d a t a . t h e d u a r t a l s o p r o v i d e s a g e n e r a l p u r p o s e 1 6 b i t c o u n t e r / t i m e r ( w h i c h m a y a l s o b e u s e d a s p r o g r a m m a b l e b i t r a t e g e n e r a t o r s ) , a 7 b i t m u l t i - p u r p o s e i n p u t p o r t a n d a n 8 b i t m u l t i - p u r p o s e o u t p u t p o r t ( f o r t h e 4 0 p i n d i p a n d 4 4 p i n p l c c p a c k a g e s o n l y ) . p r i n c i p l e s o f o p e r a t i o n f i g u r e 1 p r e s e n t s a n o v e r a l l b l o c k d i a g r a m o f t h e d u a r t . a s i l l u s t r a t e d i n t h e b l o c k d i a g r a m , t h e d u a r t c o n s i s t s o f t h e f o l l o w i n g m a j o r f u n c t i o n a l b l o c k s : d d a t a b u s b u f f e r d i n t e r r u p t c o n t r o l d i n p u t p o r t d s e r i a l c o m m u n i c a t i o n c h a n n e l s a a n d b d o p e r a t i o n c o n t r o l d t i m i n g c o n t r o l d o u t p u t p o r t a . d a t a b u s b u f f e r t h e d a t a b u s b u f f e r p r o v i d e s t h e i n t e r f a c e b e t w e e n t h e i n t e r n a l ( w i t h i n t h e c h i p ) a n d e x t e r n a l d a t a b u s e s . i t i s c o n t r o l l e d b y t h e o p e r a t i o n c o n t r o l b l o c k t o a l l o w d a t a t r a n s f e r s t o t a k e p l a c e b e t w e e n t h e h o s t c p u a n d t h e d u a r t . b . o p e r a t i o n c o n t r o l b l o c k t h e c o n t r o l l o g i c o f t h e o p e r a t i o n c o n t r o l b l o c k r e c e i v e s o p e r a t i n g c o m m a n d s f r o m t h e c p u a n d g e n e r a t e s p r o p e r s i g n a l s t o t h e v a r i o u s s e c t i o n s o f t h e d u a r t . t h e o p e r a t i o n c o n t r o l b l o c k f u n c t i o n s a s t h e u s e r i n t e r f a c e t o t h e r e s t o f t h e d e v i c e . s p e c i f i c a l l y , i t i s r e s p o n s i b l e f o r d u a r t r e g i s t e r a d d r e s s d e c o d i n g , a n d c o m m a n d d e c o d i n g . t h e r e f o r e a l l c o m m a n d s t o s e t b a u d r a t e s , p a r i t y , o t h e r c o m m u n i c a t i o n p r o t o c o l p a r a m e t e r s , s t a r t o r s t o p t h e c o u n t e r / t i m e r o r r e a d i n g a ? s t a t u s r e g i s t e r ? t o m o n i t o r d a t a c o m m u n i c a t i o n p e r f o r m a n c e m u s t g o t h r o u g h t h e o p e r a t i o n c o n t r o l b l o c k . t h e o p e r a t i o n c o n t r o l b l o c k w i l l c o n t r o l d u a r t p e r f o r m a n c e b a s e d u p o n t h e f o l l o w i n g i n p u t s i g n a l s . a d d r e s s i n p u t s , a 0 - a 3 - r d - w r - c s r e s e t w h e n u s i n g t h e 6 8 0 0 f a m i l y p r o c e s s o r , t h e d u a r t w i l l r e q u i r e s o m e g l u e l o g i c . i n t e r f a c i n g a 6 8 0 0 f a m i l y p r o c e s s o r t o t h e d u a r t c a n b e e a s i l y a c h i e v e d b y i n c l u d i n g a s m a l l a m o u n t o f e x t e r n a l l o g i c d e v i c e s , a s d e p i c t e d i n f i g u r e 2 .
x r 8 8 c 6 8 1 1 4 r e v . 2 . 1 1 - r / w - w r e c l o c k - r d - r e s e t r e s e t f i g u r e 2 . e x t e r n a l l o g i c c i r c u i t r y r e q u i r e d t o i n t e r f a c e a 6 8 0 0 f a m i l y p r o c e s s o r t o t h e x r 8 8 c 6 8 1 d e v i c e b . 1 d u a r t r e g i s t e r a d d r e s s i n g t h e a d d r e s s i n g o f t h e i n t e r n a l r e g i s t e r s o f t h e d u a r t i s p r e s e n t e d i n t a b l e 1 . p l e a s e n o t e t h a t s o m e o f t h e r e g i s t e r s a r e ? r e a d o n l y ? a n d o t h e r s a r e ? w r i t e o n l y ? . e a c h c h a n n e l i s p r o v i d e d w i t h t h e f o l l o w i n g d e d i c a t e d ( a d d r e s s a b l e ) r e g i s t e r s . d c o m m a n d r e g i s t e r s d m o d e r e g i s t e r s ( m r 1 a n d m r 2 ) d s t a t u s r e g i s t e r s d c l o c k s e l e c t r e g i s t e r s d r e c e i v e r h o l d i n g r e g i s t e r ( r h r ) a n d t r a n s m i t h o l d i n g r e g i s t e r ( t h r ) a d d i t i o n a l l y , t h e d u a r t c o n t a i n s t h e f o l l o w i n g r e g i s t e r s t h a t s u p p o r t / c o n t r o l b o t h c h a n n e l s . d i n t e r r u p t s t a t u s r e g i s t e r d i n t e r r u p t m a s k r e g i s t e r d m a s k e d i n t e r r u p t s t a t u s r e g i s t e r d i n t e r r u p t v e c t o r r e g i s t e r d a u x i l i a r y c o n t r o l r e g i s t e r a n d f i n a l l y , t h e d u a r t a l s o c o n t a i n s o t h e r r e g i s t e r s t h a t s u p p o r t f u n c t i o n s o t h e r t h a n s e r i a l d a t a c o m m u n i c a t i o n , s u c h a s t h e p a r a l l e l p o r t s a n d t h e c o u n t e r s / t i m e r s . d o p c r - o u t p u t p o r t c o n t r o l r e g i s t e r d i p c r - i n p u t p o r t c o n f i g u r a t i o n r e g i s t e r d c t u r - c o u n t e r / t i m e r u p p e r b y t e r e g i s t e r d c t l r - c o u n t e r / t i m e r l o w e r b y t e r e g i s t e r
x r 8 8 c 6 8 1 1 5 r e v . 2 . 1 1 a d d r e s s ( h e x ) r e a d m o d e r e g i s t e r s w r i t e m o d e r e g i s t e r s r e g i s t e r n a m e s y m b o l r e g i s t e r n a m e s y m b o l 0 0 m o d e r e g i s t e r , c h a n n e l a m r 1 a , m r 2 a m o d e r e g i s t e r , c h a n n e l a m r 1 a , m r 2 a 0 1 s t a t u s r e g i s t e r , c h a n n e l a s r a c l o c k s e l e c t r e g i s t e r , c h a n n e l a c s r a 0 2 m a s k e d i n t e r r u p t s t a t u s r e g i s t e r m i s r c o m m a n d r e g i s t e r a c r a 0 3 r x h o l d i n g r e g i s t e r , c h a n n e l a r h r a t x h o l d i n g r e g i s t e r , c h a n n e l a t h r a 0 4 i n p u t p o r t c h a n g e r e g i s t e r i p c r a u x i l i a r y c o n t r o l r e g i s t e r a c r 0 5 i n t e r r u p t s t a t u s r e g i s t e r i s r i n t e r r u p t m a s k r e g i s t e r i m r 0 6 c o u n t e r / t i m e r u p p e r b y t e r e g i s t e r c t u c o u n t e r / t i m e r u p p e r b y t e r e g i s t e r c t u 0 7 c o u n t e r / t i m e r l o w e r b y t e r e g i s t e r c t l c o u n t e r / t i m e r l o w e r b y t e r e g i s t e r c t l 0 8 m o d e r e g i s t e r , c h a n n e l b m r 1 b , m r 2 b m o d e r e g i s t e r , c h a n n e l b m r 1 b , m r 2 b 0 9 s t a t u s r e g i s t e r , c h a n n e l b s r b c l o c k s e l e c t r e g i s t e r , c h a n n e l b c s r b 0 a r e s e r v e d c o m m a n d r e g i s t e r , c h a n n e l b c r b 0 b r x h o l d i n g r e g i s t e r , c h a n n e l b r h r b t x h o l d i n g r e g i s t e r , c h a n n e l b t h r b 0 c i n t e r r u p t v e c t o r r e g i s t e r i v r i n t e r r u p t v e c t o r r e g i s t e r i v r 0 d i n p u t p o r t i p o u t p u t p o r t c o n f i g u r a t i o n r e g i s t e r ( o p 0 - o p 7 ) o p c r 0 e s t a r t c o u n t e r / t i m e r c o m m a n d s c c s e t o u t p u t p o r t b i t s c o m m a n d s o p b c 0 f s t o p c o u n t e r / t i m e r c o m m a n d s t c c l e a r o u t p u t p o r t b i t s c o m m a n d c o p b c t a b l e 1 . d u a r t p o r t a n d r e g i s t e r a d d r e s s i n g n o t e : t h e s h a d e d b l o c k s a r e n o t r e a d / w r i t e r e g i s t e r s b u t a r e r a t h e r ? a d d r e s s - t r i g g e r e d ? c o m m a n d s . t a b l e 1 i n d i c a t e s t h a t e a c h c h a n n e l i s e q u i p p e d w i t h t w o m o d e r e g i s t e r s . a s s o c i a t e d w i t h e a c h o f t h e s e m o d e r e g i s t e r p a i r s i s a ? m o d e r e g i s t e r ? p o i n t e r o r m r p o i n t e r . u p o n c h i p / s y s t e m p o w e r u p o r r e s e t e a c h m r p o i n t e r i s ? p o i n t i n g t o ? t h e c h a n n e l m r 1 n r e g i s t e r . ( p l e a s e n o t e t h a t t h e s u f f i x ? n ? i s u s e d a t t h e e n d o f m a n y o f t h e d u a r t r e g i s t e r s s y m b o l s i n o r d e r t o r e f e r , g e n e r i c a l l y , t o e i t h e r c h a n n e l s a o r b ) . h o w e v e r , t h e c o n t e n t s o f t h e m r p o i n t e r w i l l s h i f t f r o m t h e a d d r e s s o f t h e m r 1 n r e g i s t e r t o t h a t o f t h e m r 2 n r e g i s t e r , i m m e d i a t e l y f o l l o w i n g a n y r e a d o r w r i t e a c c e s s t o t h e m r 1 n r e g i s t e r . t h e m r p o i n t e r w i l l c o n t i n u e t o ? p o i n t t o ? t h e m r 2 n r e g i s t e r u n t i l a h a r d w a r e r e s e t o c c u r s o r u n t i l a ? r e s e t m r p o i n t e r ? c o m m a n d h a s b e e n i n v o k e d . t h e ? r e s e t m r p o i n t e r ? c o m m a n d c a n b e i s s u e d b y w r i t i n g t h e
x r 8 8 c 6 8 1 1 6 r e v . 2 . 1 1 a p p r o p r i a t e d a t a t o t h e a p p r o p r i a t e c h a n n e l ? s c o m m a n d r e g i s t e r . t h e r e f o r e , b o t h m o d e r e g i s t e r s , w i t h i n a g i v e n c h a n n e l , h a v e t h e s a m e l o g i c a l a d d r e s s . t h e f e a t u r e s a n d f u n c t i o n s o f t h e d u a r t t h a t a r e c o n t r o l l e d b y t h e m o d e r e g i s t e r s a r e d i s c u s s e d i n d e t a i l i n s e c t i o n g . 3 . b . 2 c o m m a n d d e c o d i n g e a c h c h a n n e l i s e q u i p p e d w i t h a c o m m a n d r e g i s t e r . i n g e n e r a l , t h e r o l e o f t h e s e c o m m a n d r e g i s t e r s a r e t o e n a b l e / d i s a b l e t h e t r a n s m i t t e r , e n a b l e / d i s a b l e t h e r e c e i v e r , a l o n g w i t h f a c i l i t a t i n g a s e r i e s o f o t h e r m i s c e l l a n e o u s c o m m a n d s . t h e b i t f o r m a t f o r e a c h c o m m a n d r e g i s t e r i s p r e s e n t e d h e r e w i t h . b i t 7 b i t 6 b i t 5 b i t 4 b i t 3 b i t 2 b i t 1 b i t 0 m i s c e l l a n e o u s c o m m a n d s e n a b l e / d i s a b l e r e c e i v e r e n a b l e / d i s a b l e t r a n s m i t t e r s e e f o l l o w i n g t e x t 0 0 = n o c h a n g e 0 1 = e n a b l e r x 1 0 = d i s a b l e r x 1 1 = n o t v a l i d ( d o n o t u s e ) 0 0 = n o c h a n g e 0 1 = e n a b l e t x 1 0 = d i s a b l e t x 1 1 = n o t v a l i d ( d o n o t u s e ) t a b l e 2 . ( c r a , c r b ) b i t f o r m a t f o r c o m m a n d r e g i s t e r s o f c h a n n e l s a & b t h e f u n c t i o n o f t h e l o w e r n i b b l e o f t h e c o m m a n d r e g i s t e r s i s f a i r l y s t r a i g h t - f o r w a r d . t h i s n i b b l e i s u s e d t o e i t h e r e n a b l e o r d i s a b l e t h e t r a n s m i t t e r a n d / o r r e c e i v e r . t h e u p p e r n i b b l e o f t h e c o m m a n d r e g i s t e r i s u s e d t o i n v o k e a s e r i e s o f m i s c e l l a n e o u s c o m m a n d s . t a b l e 3 d e f i n e s t h e c o m m a n d s a s s o c i a t e d w i t h t h e u p p e r n i b b l e o f t h e c o m m a n d r e g i s t e r s . p l e a s e n o t e t h a t t h e u p p e r n i b b l e c o m m a n d s 1 1 6 t h r o u g h b 1 6 e f f e c t s o n l y t h e p e r f o r m a n c e o f c o m m a n d r e g i s t e r ? s c h a n n e l . h o w e v e r , c o m m a n d s c 1 6 a n d d 1 6 e f f e c t s s y s t e m ( o r c h i p ) l e v e l o p e r a t i o n . b i t 7 b i t 6 b i t 5 b i t 4 d e s c r i p t i o n 0 0 0 0 n u l l c o m m a n d . 0 0 0 1 r e s e t m r n p o i n t e r . c a u s e s t h e c h a n n e l ? s m r n p o i n t e r t o p o i n t t o m r 1 n . 0 0 1 0 r e s e t r e c e i v e r . r e s e t t h e i n d i v i d u a l c h a n n e l r e - c e i v e r a s i f a h a r d w a r e r e s e t h a s b e e n a p p l i e d . t h e r e c e i v e r i s d i s a b l e d a n d t h e f i f o i s f l u s h e d . 0 0 1 1 r e s e t t r a n s m i t t e r . r e s e t s t h e i n d i v i d u a l c h a n n e l t r a n s m i t t e r a s i f a h a r d w a r e r e s e t h a d b e e n a p p l i e d . t h e t x d n o u t p u t i s f o r c e d t o a h i g h l e v e l . t a b l e 3 . m i s c e l l a n e o u s c o m m a n d s , u p p e r n i b b l e o f a l l c o m m a n d r e g i s t e r s , u n l e s s o t h e r w i s e s p e c i f i e d ( c o n t ? d n e x t p a g e )
x r 8 8 c 6 8 1 1 7 r e v . 2 . 1 1 b i t 7 b i t 6 b i t 5 b i t 4 d e s c r i p t i o n 0 1 0 0 r e s e t e r r o r s t a t u s . c l e a r s t h e r e c e i v e d b r e a k ( r b ) , p a r i t y e r r o r ( p e ) , f r a m i n g e r r o r ( f e ) a n d o v e r r u n e r r o r ( o e ) s t a t u s b i t s , s r [ 7 : 3 ] . s p e c i f i c a l l y , i f t h e e r r o r m o d e , f o r a p a r t i c u l a r c h a n - n e l i s s e t a t ? b l o c k ? e r r o r m o d e , t h i s c o m m a n d w i l l r e s e t a l l o f t h e r e c e i v e r e r r o r i n d i c a t o r s i n t h e s t a t u s r e g i s t e r . i n t h e b l o c k e r r o r m o d e , o n c e e i t h e r a p e , f e , o e , o r r b o c c u r s , t h e e r r o r w i l l c o n t i n u e t o b e f l a g g e d i n t h e s t a t u s r e g i s t e r , u n t i l t h i s c o m m a n d i s i s s u e d . i f t h e e r r o r m o d e , f o r a p a r t i c u l a r c h a n n e l i s s e t t o ? c h a r a c t e r e r r o r m o d e ? , t h e n t h e c o n t e n t s o f t h e s t a t u s r e g i s t e r f o r p e , f e , a n d r b a r e r e f l e c t e d o n a c h a r a c t e r b y c h a r a c t e r b a s i s . i n t h e ? c h a r a c t e r e r r o r m o d e ? , t h e s t a t e o f t h e s e i n d i c a t o r s i s b a s e d o n l y u p o n t h e c h a r a c t e r t h a t i s a t t h e t o p o f t h e r h r . t h e o e i n d i c a t o r i s a l w a y s p r e s e n t e d a s a ? b l o c k e r r o r m o d e ? i n d i c a t o r , a n d r e q u i r e s t h i s c o m m a n d t o b e r e s e t . 0 1 0 1 r e s e t b r e a k c h a n g e i n t e r r u p t . c l e a r s t h e c h a n - n e l ? s b r e a k c h a n g e i n t e r r u p t s t a t u s b i t . 0 1 1 0 s t a r t b r e a k . f o r c e s t h e t x d n o u t p u t l o w . t h e t r a n s m i t t e r m u s t b e e n a b l e d t o s t a r t a b r e a k . i f t h e t r a n s m i t t e r i s e m p t y , t h e s t a r t o f t h e b r e a k m a y b e d e l a y e d u p t o t w o b i t t i m e s . i f t h e t r a n s m i t t e r i s a c - t i v e , t h e b r e a k b e g i n s w h e n t h e t r a n s m i s s i o n o f t h o s e c h a r a c t e r s i n t h e t h r i s c o m p l e t e d , v i z . , t x e m p m u s t b e t r u e b e f o r e t h e b r e a k w i l l b e g i n . 0 1 1 1 s t o p b r e a k . t h e t x d n l i n e w i l l g o h i g h w i t h i n t w o b i t t i m e s . t x d n w i l l r e m a i n h i g h f o r o n e b i t t i m e b e - f o r e t h e n e x t c h a r a c t e r , i f a n y , i s t r a n s m i t t e d . 1 0 0 0 s e t r x b r g s e l e c t e x t e n d b i t . s e t s t h e c h a n n e l ? s ? r e c e i v e r b r g s e l e c t e x t e n d b i t ? t o 1 . 1 0 0 1 c l e a r r x b r g s e l e c t e x t e n d b i t . c l e a r s t h e c h a n - n e l ? s ? r e c e i v e r b r g s e l e c t e x t e n d b i t ? t o 0 . 1 0 1 0 s e t t x b r g s e l e c t e x t e n d b i t . s e t s t h e c h a n n e l ? s ? t r a n s m i t t e r b r g s e l e c t e x t e n d b i t ? t o 1 . 1 0 1 1 c l e a r t x b r g s e l e c t e x t e n d b i t . c l e a r s t h e c h a n - n e l ? s ? t r a n s m i t t e r b r g s e l e c t e x t e n d b i t ? t o 0 . t a b l e 3 . m i s c e l l a n e o u s c o m m a n d s , u p p e r n i b b l e o f a l l c o m m a n d r e g i s t e r s , u n l e s s o t h e r w i s e s p e c i f i e d ( c o n t ? d )
x r 8 8 c 6 8 1 1 8 r e v . 2 . 1 1 b i t 7 b i t 6 b i t 5 b i t 4 d e s c r i p t i o n 1 1 0 0 s e t s t a n d b y m o d e ( c h a n n e l a ) . w h e n t h i s c o m - m a n d i s i n v o k e d v i a t h e c h a n n e l a c o m m a n d r e g i s - t e r , p o w e r i s r e m o v e d f r o m e a c h o f t h e t r a n s m i t t e r s , r e c e i v e r s , c o u n t e r / t i m e r a n d a d d i t i o n a l c i r c u i t s t o p l a c e t h e d u a r t i n t h e s t a n d b y ( o r l o w e r p o w e r ) m o d e . p l e a s e n o t e t h a t t h i s c o m m a n d e f f e c t s t h e o p e r a t i o n o f t h e e n t i r e c h i p . n o r m a l o p e r a t i o n i s r e - s t o r e d b y a h a r d w a r e r e s e t o r b y i n v o k i n g t h e ? s e t a c t i v e m o d e ? c o m m a n d . r e s e t i u s l a t c h ( c h a n n e l b ) . w h e n t h i s c o m m a n d i s i n v o k e d v i a t h e c h a n n e l b c o m m a n d r e g i s t e r , a n d t h e d u a r t i s o p e r a t i n g i n z - m o d e , i t c a u s e s t h e i n t e r r u p t - u n d e r - s e r v i c e ( i u s ) l a t c h t o b e r e s e t . t h i s , i n t u r n , w i l l c a u s e t h e i e o o u t p u t t o t o g g l e ? h i g h ? . 1 1 0 1 s e t a c t i v e m o d e ( c h a n n e l a ) . w h e n t h i s c o m - m a n d i s i n v o k e d v i a t h e c h a n n e l a c o m m a n d r e g i s - t e r , t h e d u a r t i s r e m o v e d f r o m t h e s t a n d b y m o d e a n d r e s u m e s n o r m a l o p e r a t i o n . s e t z - m o d e ( c h a n n e l b ) . w h e n t h i s c o m m a n d i s i n v o k e d v i a t h e c h a n n e l b c o m m a n d r e g i s t e r , t h e d u a r t i s c o n d i t i o n e d t o o p e r a t e i n t h e z - m o d e . f o r a d e t a i l e d d i s c u s s i o n o f t h e d u a r t ? s o p e r a t i o n w h i l e i n t h e z - m o d e , p l e a s e s e e s e c t i o n c . 6 . 2 . ( n o t a v a i l - a b l e f o r t h e 2 8 p i n d i p p a c k a g e d d e v i c e s ) 1 1 1 0 r e s e r v e d . 1 1 1 1 r e s e r v e d . t a b l e 3 . m i s c e l l a n e o u s c o m m a n d s , u p p e r n i b b l e o f a l l c o m m a n d r e g i s t e r s , u n l e s s o t h e r w i s e s p e c i f i e d ( c o n t ? d ) i n a d d i t i o n t o t h e c o m m a n d s w h i c h a r e a v a i l a b l e t h r o u g h t h e c o m m a n d r e g i s t e r s , t h e d u a r t a l s o o f f e r s ? a d d r e s s - t r i g g e r e d ? c o m m a n d s . t h e s e c o m m a n d s a r e l i s t e d i n t a b l e 1 , ? d u a r t p o r t a n d r e g i s t e r a d d r e s s i n g ? ; a n d a r e f u r t h e r i d e n t i f i e d b y b e i n g ? s h a d e d ? i n t a b l e 1 . s p e c i f i c a l l y , t h e s e c o m m a n d s a r e : d s t a r t c o u n t e r / t i m e r c o m m a n d d s t o p c o u n t e r / t i m e r c o m m a n d d s e t o u t p u t p o r t b i t s c o m m a n d d c l e a r o u t p u t p o r t b i t s c o m m a n d e a c h o f t h e s e c o m m a n d s a r e i n v o k e d b y e i t h e r r e a d i n g o r w r i t i n g d a t a t o t h e i r c o r r e s p o n d i n g d u a r t a d d r e s s e s a s s p e c i f i e d i n t a b l e 1 . f o r e x a m p l e : t h e s t a r t c o u n t e r / t i m e r c o m m a n d i s i n v o k e d b y t h e p r o c e d u r e o f r e a d i n g d u a r t a d d r e s s 0 e 1 6 . p l e a s e n o t e t h a t t h i s ? r e a d o p e r a t i o n ? w i l l n o t r e s u l t i n p l a c i n g t h e c o n t e n t s o f a d u a r t r e g i s t e r o n t h e d a t a b u s . t h e o n l y t h i n g t h a t w i l l h a p p e n , i n r e s p o n s e t o t h i s p r o c e d u r e i s t h e c o u n t e r / t i m e r w i l l i n i t i a t e c o u n t i n g . f o r a d e t a i l e d d i s c u s s i o n i n t o t h e o p e r a t i o n o f t h e c o u n t e r / t i m e r , p l e a s e s e e s e c t i o n d . 2 . a n o t h e r e x a m p l e o f a n a d d r e s s - t r i g g e r e d c o m m a n d s i s t h e ? s e t o u t p u t p o r t b i t s ? c o m m a n d . t h i s c o m m a n d i s i n v o k e d b y p e r f o r m i n g a w r i t e o f d a t a t o d u a r t a d d r e s s 0 e 1 6 . w h e n t h e u s e r i n v o k e s t h i s c o m m a n d , h e / s h e i s s e t t i n g c e r t a i n b i t s ( t o ? 1 ? ) w i t h i n t h e o p r ( o u t p u t p o r t r e g i s t e r ) . a l l o t h e r b i t s , w i t h i n t h e o p r ( n o t s p e c i f i e d t o b e s e t ) , a r e n o t c h a n g e d . t h e s t a t e o f t h e o u t p u t p o r t p i n s a r e c o m p l e m e n t s o f t h e i n d i v i d u a l b i t s w i t h i n t h e o p r . h e n c e , i f o p r [ 0 ] i s s e t t o ? 1 ? , t h e s t a t e o f t h e c o r r e s p o n d i n g o u t p u t p o r t p i n , o p 0 , i s n o w s e t t o a l o g i c ? 0 ? . c o n s e q u e n t l y , o n e c a n t h i n k o f t h e ? s e t o u t p u t p o r t b i t s ? c o m m a n d a s t h e ? c l e a r o u t p u t p o r t p i n s ? c o m m a n d . f o r a m o r e d e t a i l e d d i s c u s s i o n i n t o t h e o p e r a t i o n o f t h e o u t p u t p o r t s , p l e a s e s e e s e c t i o n f .
x r 8 8 c 6 8 1 1 9 r e v . 2 . 1 1 c . i n t e r r u p t c o n t r o l b l o c k t h e i n t e r r u p t c o n t r o l b l o c k a l l o w s t h e u s e r t o a p p l y t h e d u a r t i n a n ? i n t e r r u p t d r i v e n ? e n v i r o n m e n t . t h e d u a r t i n c l u d e s a n i n t e r r u p t r e q u e s t o u t p u t s i g n a l ( - i n t r ) , w h i c h m a y b e p r o g r a m m e d t o b e a s s e r t e d u p o n t h e o c c u r r e n c e o f a n y o f t h e f o l l o w i n g e v e n t s : d t r a n s m i t h o l d r e g i s t e r a o r b r e a d y d r e c e i v e h o l d r e g i s t e r a o r b r e a d y d r e c e i v e f i f o a o r b f u l l d s t a r t o r e n d o f r e c e i v e d b r e a k i n c h a n n e l s a o r b d e n d o f c o u n t e r / t i m e r c o u n t r e a c h e d d c h a n g e o f s t a t e o n i n p u t p i n s , i p 0 , i p 1 , i p 2 , i p 3 t h e i n t e r r u p t c o n t r o l b l o c k c o n s i s t s o f a n i n t e r r u p t s t a t u s r e g i s t e r s ( i s r ) , a n i n t e r r u p t m a s k r e g i s t e r s ( i m r ) , a m a s k e d i n t e r r u p t s t a t u s r e g i s t e r s ( m i s r ) a n d a n i n t e r r u p t v e c t o r r e g i s t e r ( i v r ) . t a b l e 4 l i s t s t h e s e r e g i s t e r s , t h e i r a d d r e s s l o c a t i o n ( w i t h i n t h e d u a r t ) . r e g i s t e r d e s c r i p t i o n a d d r e s s l o c a t i o n ( i n d u a r t a d d r e s s s p a c e ) i s r i m r m i s r i v r i n t e r r u p t s t a t u s r e g i s t e r i n t e r r u p t m a s k r e g i s t e r m a s k e d i n t e r r u p t s t a t u s r e g i s t e r i n t e r r u p t v e c t o r r e g i s t e r 0 5 1 6 ( r e a d o n l y ) 0 5 1 6 ( w r i t e o n l y ) 0 2 1 6 ( r e a d o n l y ) 0 c 1 6 t a b l e 4 . l i s t i n g a n d b r i e f d e s c r i p t i o n o f i n t e r r u p t s y s t e m r e g i s t e r s t h e r o l e a n d p u r p o s e o f e a c h o f t h e s e r e g i s t e r s a r e d e f i n e d h e r e . c . 1 i n t e r r u p t s t a t u s r e g i s t e r s ( i s r ) t h e c o n t e n t s o f t h e i s r i n d i c a t e s t h e s t a t u s o f a l l p o t e n t i a l i n t e r r u p t c o n d i t i o n s . i f a n y b i t s w i t h i n t h e s e r e g i s t e r s a r e t o g g l e d ? h i g h ? , t h e n t h e c o r r e s p o n d i n g c o n d i t i o n h a s o r i s o c c u r r i n g . i n g e n e r a l , t h e c o n t e n t s o f t h e i s r w i l l i n d i c a t e t o t h e p r o c e s s o r , t h e s o u r c e o r t h e r e a s o n f o r t h e i n t e r r u p t r e q u e s t f r o m t h e d u a r t . t h e r e f o r e , a n y i n t e r r u p t s e r v i c e r o u t i n e f o r t h e d u a r t s h o u l d b e g i n b y r e a d i n g e i t h e r t h i s r e g i s t e r o r t h e m i s r ( m a s k e d i n t e r r u p t s t a t u s r e g i s t e r ) . t h e b i t - f o r m a t o f t h e i s r i s p r e s e n t e d i n t a b l e 5 : b i t 7 b i t 6 b i t 5 b i t 4 b i t 3 b i t 2 b i t 1 b i t 0 i n p u t p o r t c h a n g e d e l t a b r e a k b r x r d y / f f u l l b t x r d y b c o u n t e r r e a d y d e l t a b r e a k a r x r d y / f f u l l a t x r d y a 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s t a b l e 5 . i s r b i t f o r m a t t h e d e f i n i t i o n o f t h e m e a n i n g b e h i n d e a c h o f t h e s e b i t s i s p r e s e n t e d h e r e . i s r [ 7 ] : i n p u t p o r t c h a n g e o f s t a t e i f t h i s b i t i s a t a l o g i c ? 1 ? , t h e n a c h a n g e o f s t a t e w a s d e t e c t e d a t i n p u t p o r t p i n s i p 0 - i p 3 . t h e u s e r w o u l d s e r v i c e t h i s i n t e r r u p t b y r e a d i n g t h e i p c r ( i f i s r [ 7 ] = 1 ) . i s r [ 7 ] i s c l e a r e d w h e n t h e c p u h a s r e a d t h e i n p u t p o r t c o n f i g u r a t i o n r e g i s t e r ( i p c r ) . b y r e a d i n g t h e i p c r , t h e u s e r w i l l d e t e r m i n e : d t h e i n d i v i d u a l i n p u t p o r t p i n t h a t c h a n g e d s t a t e d t h e f i n a l s t a t e o f t h e m o n i t o r e d i n p u t p o r t s , f o l l o w i n g t h e c h a n g e o f s t a t e . f o r a d e t a i l e d d e s c r i p t i o n o f t h e i p c r , s e e s e c t i o n f . p l e a s e n o t e t h a t i n o r d e r t o e n a b l e t h i s i n t e r r u p t c o n d i t i o n , t h e u s e r m u s t d o t w o t h i n g s : 1 . w r i t e t h e a p p r o p r i a t e d a t a t o t h e l o w e r n i b b l e o f t h e a u x i l i a r y c o n t r o l r e g i s t e r , a c r [ 3 : 0 ] . i n t h i s s t e p , t h e u s e r i s s p e c i f y i n g w h i c h i n p u t p i n s s h o u l d t r i g g e r a n ? i n p u t p o r t c h a n g e ? i n t e r r u p t r e q u e s t .
x r 8 8 c 6 8 1 2 0 r e v . 2 . 1 1 2 . w r i t e a l o g i c ? 1 ? t o i m r [ 7 ] . i s r [ 6 ] d e l t a b r e a k i n d i c a t o r - c h a n n e l b w h e n t h i s b i t i s s e t , i t i n d i c a t e s t h a t t h e c h a n n e l b r e c e i v e r h a s d e t e c t e d t h e b e g i n n i n g o r e n d o f a r e c e i v e d b r e a k ( r b ) . t h i s b i t i s c l e a r e d ( o r r e s e t ) w h e n t h e c p u i n v o k e s a c h a n n e l b ? r e s e t b r e a k c h a n g e i n t e r r u p t ? c o m m a n d ( s e e t a b l e 3 ) . f o r m o r e i n f o r m a t i o n i n t o t h e d u a r t ? s r e s p o n s e t o a b r e a k c o n d i t i o n , p l e a s e s e e s e c t i o n g . 2 . i s r [ 5 ] r x r d y / f f u l l b - c h a n n e l b r e c e i v e r r e a d y o r f i f o f u l l t h e f u n c t i o n o f t h i s b i t i s s e l e c t e d b y p r o g r a m m i n g m r 1 b [ 6 ] . i f p r o g r a m m e d a s t h e r e c e i v e r r e a d y i n d i c a t o r ( r x r d y b ) , i t i n d i c a t e s t h a t a t l e a s t o n e c h a r a c t e r o f d a t a i s i n r h r b a n d i s r e a d y t o b e r e a d b y t h e c p u . t h i s b i t i s s e t w h e n a c h a r a c t e r i s t r a n s f e r r e d f r o m t h e r e c e i v e r s h i f t r e g i s t e r t o r h r b a n d i s c l e a r e d w h e n t h e c p u r e a d s t h e r h r b . i f t h e r e a r e s t i l l m o r e c h a r a c t e r s i n r h r b a f t e r t h e r e a d o p e r a t i o n , t h e b i t w i l l b e s e t a g a i n a f t e r r h r b i s ? p o p p e d ? . i f t h i s b i t i s p r o g r a m m e d a s f i f o f u l l i n d i c a t o r ( f f u l l b ) , i t i s s e t w h e n a c h a r a c t e r i s t r a n s f e r r e d f r o m t h e r s r t o r h r b a n d t h e t r a n s f e r c a u s e s r h r b t o b e c o m e f u l l . t h i s b i t i s c l e a r e d w h e n t h e c p u r e a d s r h r b ; a n d t h e r e b y ? p o p p i n g ? t h e f i f o , m a k i n g r o o m f o r t h e n e x t c h a r a c t e r . i f a c h a r a c t e r i s w a i t i n g i n t h e r s r b e c a u s e r h r b i s f u l l , t h i s b i t w i l l b e s e t a g a i n a f t e r t h e r e a d o p e r a t i o n , w h e n t h a t c h a r a c t e r i s l o a d e d i n t o r h r b . n o t e : i f t h i s b i t i s c o n f i g u r e d t o r e f l e c t t h e f f u l l b i n d i c a t o r , t h i s b i t w i l l n o t b e s e t ( n o r w i l l p r o d u c e a n i n t e r r u p t r e q u e s t ) i f o n e o r t w o c h a r a c t e r s a r e s t i l l r e m a i n i n g i n r h r b , f o l l o w i n g d a t a r e c e p t i o n . h e n c e , i t i s p o s s i b l e t h a t t h e l a s t t w o c h a r - a c t e r s i n a s t r i n g o f d a t a ( b e i n g r e c e i v e d ) c o u l d b e l o s t d u e t o t h i s p h e n o m e n o n . i s r [ 4 ] t x r d y b - c h a n n e l b t r a n s m i t t e r r e a d y t h i s b i t i s a d u p l i c a t e o f t x r d y b , s r b [ 2 ] . t h i s b i t , w h e n s e t , i n d i c a t e s t h a t t h r b i s e m p t y a n d i s r e a d y t o a c c e p t a c h a r a c t e r f r o m t h e c p u . t h e b i t i s c l e a r e d w h e n t h e c p u w r i t e s a n e w c h a r a c t e r t o t h r b ; a n d i s s e t a g a i n , w h e n t h a t c h a r a c t e r i s t r a n s f e r r e d t o t h e t s r . t x r d y b i s s e t w h e n t h e t r a n s m i t t e r i s i n i t i a l l y e n a b l e d a n d i s c l e a r e d w h e n t h e t r a n s m i t t e r i s d i s a b l e d . c h a r a c t e r s l o a d e d i n t o t h r b w h i l e t h e t r a n s m i t t e r i s d i s a b l e d w i l l n o t b e t r a n s m i t t e d . i s r [ 3 ] c o u n t e r r e a d y i n t h e t i m e r m o d e , t h e c / t ( c o u n t e r / t i m e r ) w i l l s e t i s r [ 3 ] o n c e e a c h c y c l e o f t h e r e s u l t a n t s q u a r e w a v e ( a v a i l a b l e a t t h e o p 3 p i n ) . i s r [ 3 ] w i l l b e c l e a r e d b y i n v o k i n g t h e ? s t o p c o u n t e r ? c o m m a n d . b e a r i n m i n d , t h a t i n t h e t i m e r m o d e , t h e ? s t o p c o u n t e r ? c o m m a n d w i l l n o t s t o p t h e c / t . i n t h e c o u n t e r m o d e , t h i s b i t i s s e t w h e n t h e c o u n t e r r e a c h e s t h e t e r m i n a l c o u n t ( 0 0 0 0 1 6 ) a n d i s c l e a r e d w h e n t h e c o u n t e r i s s t o p p e d b y a ? s t o p c o u n t e r ? c o m m a n d . w h e n t h e c o u n t e r / t i m e r i s i n t h e c o u n t e r m o d e , t h e ? s t o p c o u n t e r ? c o m m a n d w i l l s t o p t h e c o u n t e r / t i m e r . i s r [ 2 ] : d e l t a b r e a k a - c h a n n e l a c h a n g e i n b r e a k a s s e r t i o n o f t h i s b i t i n d i c a t e s t h a t t h e c h a n n e l a r e c e i v e r h a s d e t e c t e d t h e b e g i n n i n g o f o r t h e e n d o f a r e c e i v e d b r e a k ( r b ) . t h i s b i t i s c l e a r e d w h e n t h e c p u i n v o k e s a c h a n n e l a ? r e s e t b r e a k c h a n g e i n t e r r u p t ? c o m m a n d . f o r m o r e i n f o r m a t i o n i n t o t h e d u a r t ? s r e s p o n s e t o a b r e a k c o n d i t i o n , p l e a s e s e e s e c t i o n g . 2 . i s r [ 1 ] r x r d y a / f f u l l a - c h a n n e l a r e c e i v e r r e a d y o r f i f o f u l l t h e f u n c t i o n o f t h i s b i t i s s e l e c t e d b y p r o g r a m m i n g m r 1 a [ 6 ] . i f p r o g r a m m e d a s t h e r e c e i v e r r e a d y i n d i c a t o r ( r x r d y a ) , t h i s b i t i n d i c a t e s t h a t t h e r e i s a t l e a s t o n e c h a r a c t e r o f d a t a i n r h r a , a n d i s r e a d y t o b e r e a d b y t h e c p u . t h i s b i t i s s e t w h e n a c h a r a c t e r i s t r a n s f e r r e d f r o m t h e r s r t o r h r a a n d i s c l e a r e d w h e n t h e c p u r e a d s ( o r ? p o p s ? ) r h r a . i f t h e r e a r e s t i l l m o r e c h a r a c t e r s i n r h r a , f o l l o w i n g t h e r e a d o p e r a t i o n , t h e b i t w i l l b e s e t a g a i n a f t e r r h r a i s ? p o p p e d ? . i f t h i s b i t i s p r o g r a m m e d a s t h e f i f o ( r h r ) f u l l i n d i c a t o r ( f f u l l a ) , i t i s s e t w h e n a c h a r a c t e r i s t r a n s f e r r e d f r o m t h e r s r t o r h r a a n d t h e n e w l y t r a n s f e r r e d c h a r a c t e r c a u s e s r h r a t o b e c o m e f u l l . t h i s b i t i s c l e a r e d w h e n t h e c p u r e a d s r h r a . i f a c h a r a c t e r i s w a i t i n g i n t h e r s r b e c a u s e r h r a i s f u l l , t h i s b i t w i l l b e s e t a g a i n , f o l l o w i n g t h e r e a d o p e r a t i o n , w h e n t h a t c h a r a c t e r i s l o a d e d i n t o r h r a . n o t e : i f t h i s b i t i s c o n f i g u r e d t o r e f l e c t t h e f f u l l a i n d i c a t o r , t h i s b i t w i l l n o t b e s e t ( n o r w i l l p r o d u c e a n i n t e r r u p t r e q u e s t ) i f
x r 8 8 c 6 8 1 2 1 r e v . 2 . 1 1 o n e o r t w o c h a r a c t e r s a r e s t i l l r e m a i n i n g i n r h r a , f o l l o w i n g d a t a r e c e p t i o n . h e n c e , i t i s p o s s i b l e t h a t t h e l a s t t w o c h a r - a c t e r s i n a s t r i n g o f d a t a ( b e i n g r e c e i v e d ) c o u l d b e l o s t d u e t o t h i s p h e n o m e n o n . t h e r e f o r e , t h e u s e r i s a d v i s e d t o r e a d r h r a u n t i l e m p t y . i s r [ 0 ] : c h a n n e l a t r a n s m i t t e r r e a d y t h i s b i t i s a d u p l i c a t e o f t x r d y a , s r a [ 2 ] . t h i s b i t , w h e n s e t , i n d i c a t e s t h a t t h r a i s e m p t y a n d i s r e a d y t o a c c e p t a c h a r a c t e r f r o m t h e c p u . t h e b i t i s c l e a r e d w h e n t h e c p u w r i t e s a n e w c h a r a c t e r t o t h r a ; a n d i s s e t a g a i n , w h e n t h a t c h a r a c t e r i s t r a n s f e r r e d t o t h e t s r . t x r d y a i s s e t w h e n t h e t r a n s m i t t e r i s i n i t i a l l y e n a b l e d a n d i s c l e a r e d w h e n t h e t r a n s m i t t e r i s d i s a b l e d . c h a r a c t e r s l o a d e d i n t o t h r a w h i l e t h e t r a n s m i t t e r i s d i s a b l e d w i l l n o t b e t r a n s m i t t e d . c . 2 i n t e r r u p t m a s k r e g i s t e r ( i m r ) t h e i n t e r r u p t m a s k r e g i s t e r i s a ? w r i t e o n l y ? r e g i s t e r w h i c h e n a b l e s t h e u s e r t o s e l e c t t h e c o n d i t i o n s t h a t w i l l c a u s e t h e d u a r t t o i s s u e a n i n t e r r u p t r e q u e s t t o t h e p r o c e s s o r . i n o t h e r w o r d s , t h e u s e r h a s t h e o p t i o n o f m a s k i n g o r b l o c k i n g c e r t a i n c o n d i t i o n s f r o m c a u s i n g t h e d u a r t t o i s s u e a n i n t e r r u p t r e q u e s t . t h e r e f o r e , t h e b i t - f o r m a t o f t h e i m r i s e s s e n t i a l l y t h e s a m e a s t h e i s r . h o w e v e r , f o r c o m p l e t e n e s s , t h e b i t f o r m a t o f t h e i m r i s p r e s e n t e d h e r e . b i t 7 b i t 6 b i t 5 b i t 4 b i t 3 b i t 2 b i t 1 b i t 0 i n p u t p o r t c h a n g e d e l t a b r e a k b r x r d y / f f u l l b t x r d y b c o u n t e r r e a d y d e l t a b r e a k a r x r d y / f f u l l a t x r d y a 0 = o f f 1 = o n 0 = o f f 1 = o n 0 = o f f 1 = o n 0 = o f f 1 = o n 0 = o f f 1 = o n 0 = o f f 1 = o n 0 = o f f 1 = o n 0 = o f f 1 = o n t a b l e 6 . i m r b i t f o r m a t i f t h e u s e r w i s h e s t o e n a b l e a c e r t a i n i n t e r r u p t , h e / s h e s h o u l d w r i t e a ? 1 ? t o t h e b i t w i t h i n t h e i m r , c o r r e s p o n d i n g t o t h a t i n t e r r u p t c o n d i t i o n . l i k e w i s e , t o d i s a b l e o r m a s k o u t a c e r t a i n c o n d i t i o n c a u s i n g a n i n t e r r u p t , t h e u s e r s h o u l d w r i t e a ? 0 ? t o t h e b i t l o c a t i o n c o r r e s p o n d i n g t o t h a t c o n d i t i o n . t o e n a b l e a l l i n t e r r u p t s t h e u s e r w o u l d w r i t e f f 1 6 ( a l l ? 1 ? s ) t o t h i s r e g i s t e r s . p l e a s e n o t e t h a t i m r i s a w r i t e o n l y r e g i s t e r s , a n d c a n t h e r e f o r e n o t b e r e a d b y t h e p r o c e s s o r . c . 3 m a s k e d i n t e r r u p t s t a t u s r e g i s t e r ( m i s r ) t h e c o n t e n t o f t h e m i s r r e g i s t e r i s b a s i c a l l y t h e r e s u l t s o f a n d i n g t h e i s r a n d i m r t o g e t h e r . m i s r c o n t e n t = [ i s r c o n t e n t s ] [ i m r c o n t e n t s ] o n e l i m i t a t i o n o f d u a r t i n t e r r u p t s e r v i c e r o u t i n e s t h a t r e l y o n r e a d i n g t h e i s r i s t h a t t h e b i t s w i t h i n t h e i s r c a n t o g g l e ? h i g h ? d u e t o t h e i r c o r r e s p o n d i n g c o n d i t i o n s w h e t h e r o r n o t t h e y a r e e n a b l e d b y t h e i m r . t h e r e f o r e , t h e u s e r , f o l l o w i n g r e a d i n g t h e i n t e r r u p t s t a t u s r e g i s t e r , w i l l h a v e t o m a k e p r o v i s i o n s f o r ; a n d e x e c u t e a ? b i t - b y - b i t ? a n d o f t h e i s r a n d i m r c o n t e n t s . s i n c e t h e i m r i s a ? w r i t e o n l y ? r e g i s t e r a n d c a n n o t b e r e a d b y t h e p r o c e s s o r , t h e c o n t e n t s o f t h e i m r w i l l h a v e t o b e s t o r e d i n s y s t e m m e m o r y , f o r l a t e r r e c a l l . t h e a d d i t i o n a l h a r d w a r e a n d s o f t w a r e o v e r h e a d r e q u i r e d t o s u p p o r t t h i s a c t i v i t y c a n b e e l i m i n a t e d v i a u s e o f t h e m i s r . c . 4 i n t e r r u p t v e c t o r r e g i s t e r , i v r t h i s r e g i s t e r i s o n l y u s e d f o r i n t e r r u p t v e c t o r g e n e r a t i o n w h e n t h e d u a r t i s c o m m a n d e d i n t o t h e s p e c i a l z - m o d e . w h i l e i n t h i s m o d e , t h e c o n t e n t s o f t h e i v r i s t y p i c a l l y r e l a t e d t o t h e s t a r t i n g a d d r e s s o f t h e d u a r t s i n t e r r u p t s e r v i c e r o u t i n e . o t h e r w i s e , i n t h e i - m o d e , i n t e r r u p t v e c t o r g e n e r a t i o n i s t y p i c a l l y p e r f o r m e d o f f - c h i p . w h e n t h e d u a r t i s o p e r a t i n g i n t h e i - m o d e , t h e i v r c a n b e u s e d a s g e n e r a l p u r p o s e r e a d / w r i t e r e g i s t e r s . t h e r o l e o f t h e i v r , w h i l e t h e d u a r t i s o p e r a t i n g i n t h e z - m o d e i s p r e s e n t e d i n s e c t i o n c . 6 . c . 5 l i m i t a t i o n s o f t h e d u a r t i n t e r r u p t s t r u c t u r e t h e i n t e r r u p t s t r u c t u r e o f f e r e d b y t h e d u a r t a l l o w s t h e u s e r t o p r o g r a m t h e d u a r t t o g e n e r a t e i n t e r r u p t s i n r e s p o n s e t o c e r t a i n t h r a n d r h r ( f i f o ) c o n d i t i o n s ; t h e c o u n t e r / t i m e r r e a d y c o n d i t i o n , a n d t o c h a n g e s i n t h e b r e a k c o n d i t i o n ( a t t h e r e c e i v e r ) . h o w e v e r , a s i d e f r o m t h e ? d e l t a b r e a k c o n d i t i o n ? ( r b ) , t h e d u a r t ? s i n t e r r u p t s t r u c t u r e d o e s n o t a l l o w f o r i n t e r r u p t r e q u e s t s d u e t o
x r 8 8 c 6 8 1 2 2 r e v . 2 . 1 1 r e c e i v e r p r o b l e m s s u c h a s p a r i t y e r r o r ( p e ) , r e c e i v e r o v e r r u n e r r o r ( o e ) , o r f r a m i n g e r r o r ( f e ) . t h e d u a r t a l s o d o e s n o t o f f e r t h e u s e r t o a b i l i t y t o c o n f i g u r e o n e o f t h e o u t p u t p o r t s t o r e l a y t h e o c c u r r e n c e o f a n y o f t h e s e c o n d i t i o n s . t h e r e f o r e , u n l e s s t h e u s e r i s i m p l e m e n t i n g s o m e s o r t o f ? d a t a l i n k l a y e r ? e r r o r c h e c k i n g s c h e m e s u c h a s c r c , t h e u s e r i s a d v i s e d t o ? v a l i d a t e ? t h e r e c e i v e d d a t a b y f r e q u e n t l y r e a d i n g t h e s t a t u s r e g i s t e r ; a n d c h e c k i n g f o r a n y n o n - z e r o u p p e r - n i b b l e v a l u e s . t h i s i s e s p e c i a l l y t h e c a s e i f t h e u s e r h a s s e t t h e e r r o r m o d e t o ? c h a r a c t e r ? ( m r 1 n [ 5 ] = 0 ) . c . 6 s e r v i c i n g d u a r t i n t e r r u p t s i n t e r r u p t s e r v i c i n g w i t h t h e x r 8 8 c 6 8 1 d u a r t f a l l s i n t o t w o b r o a d c a t e g o r i e s : i - m o d e a n d z - m o d e . i - m o d e h a s h i s t o r i c a l l y b e e n r e f e r r e d t o a s t h e ? i n t e l ? m o d e . l i k e w i s e , t h e z - m o d e h a s b e e n r e f e r r e d t o a s t h e ? z i l o g ? m o d e . w h e n t h e d u a r t i s o p e r a t i n g i n t h e z - m o d e , t h e d u a r t w i l l p l a c e a n 8 b i t ? i n t e r r u p t v e c t o r ? o n t h e d a t a b u s , t o t h e c p u , d u r i n g t h e ? i n t e r r u p t a c k n o w l e d g e ? o r i a c k c y c l e . t h e c p u w i l l r e a d t h i s i n t e r r u p t v e c t o r f r o m t h e d a t a b u s , a n d d e t e r m i n e ( f r o m t h e i n t e r r u p t v e c t o r d a t a ) t h e l o c a t i o n o f t h e a p p r o p r i a t e i n t e r r u p t s e r v i c e r o u t i n e , i n s y s t e m m e m o r y . a d d i t i o n a l l y , t h e z - m o d e g i v e s t h e u s e r a h a r d w a r e a p p r o a c h t o p r i o r i t i z e t h e i n t e r r u p t r e q u e s t s a m o n g n u m e r o u s p e r i p h e r a l d e v i c e s . t h i s p h e n o m e n o n i s d i s c u s s e d i n g r e a t e r d e t a i l i n s e c t i o n c . 6 . 2 . w h e n t h e d u a r t i s o p e r a t i n g i n t h e i - m o d e , t h e d u a r t w i l l n o t p r o v i d e a n y i n t e r r u p t v e c t o r i n f o r m a t i o n t o t h e c p u , d u r i n g t h e i a c k c y c l e . i n t e r r u p t v e c t o r i n f o r m a t i o n , o r a n y m e a n s t o r o u t e p r o g r a m c o n t r o l t o t h e a p p r o p r i a t e i n t e r r u p t s e r v i c e r o u t i n e , i s a c c o m p l i s h e d e x t e r n a l t o t h e d u a r t . t h e d u a r t w i l l b e i n t h e i - m o d e f o l l o w i n g p o w e r u p o r a h a r d w a r e r e s e t . t h e u s e r m u s t i n v o k e t h e ? s e t z - m o d e ? c o m m a n d , i n o r d e r t o c o m m a n d t h e d u a r t i n t o t h e z - m o d e . a l t h o u g h t h e i - m o d e h a s b e e n r e f e r r e d t o a s t h e ? i n t e l ? m o d e , a n d t h e z - m o d e a s t h e ? z i l o g ? m o d e ; t h i s d o e s n o t m e a n t h a t t h e u s e r s h o u l d o n l y o p e r a t e t h e d u a r t i n t h e z - m o d e w h e n i n t e r f a c i n g a z i l o g m i c r o p r o c e s s o r , o r i n t h e i - m o d e w h e n i n t e r f a c i n g t o a n i n t e l m i c r o p r o c e s s o r . t h e d i v i s i o n b e t w e e n i - m o d e a n d z - m o d e i s n o t n e c e s s a r y a l o n g ? c o r p o r a t e ? l i n e s . i f y o u a r e i n t e r f a c i n g t h e d u a r t t o t h e f o l l o w i n g m i c r o p r o c e s s o r s / m i c r o c o n t r o l l e r s , t h e n t h e d u a r t m u s t o p e r a t e i n t h e i - m o d e . d 8 0 5 1  p d 8 0 8 0  c p d 8 0 8 5  p d 6 8 h c 1 1  c d z - 8 0  p ( i n t e r r u p t m o d e s 0 a n d 1 ) h o w e v e r , t h e d u a r t s h o u l d b e o p e r a t i n g i n t h e z - m o d e w h e n i n t e r f a c i n g t h e f o l l o w i n g m i c r o p r o c e s s o r s / m i c r o c o n t r o l l e r s . d 8 0 8 8  p d 8 0 8 6  p d 8 0 2 8 6 - 8 0 4 8 6  p s d p e n t i u m  p d z - 8 0  p ( i n t e r r u p t m o d e s 2 ) t h e n e x t f e w s e c t i o n s w i l l p r o v i d e d e t a i l e d d i s c u s s i o n s o f d u a r t / m i c r o p r o c e s s o r i n t e r f a c i n g a n d i n t e r r u p t p r o c e s s i n g o n e a c h o f t h e a b o v e - m e n t i o n e d m i c r o p r o c e s s o r s . f r o m t h i s d i s c u s s i o n , a d e t a i l e d d e s c r i p t i o n o f i - m o d e i n t e r r u p t p r o c e s s i n g a n d z - m o d e i n t e r r u p t p r o c e s s i n g w i l l e m e r g e . c . 6 . 1 i - m o d e i n t e r r u p t s e r v i c i n g t h e d u a r t w i l l b e i n t h e i - m o d e f o l l o w i n g p o w e r u p o f t h e i c , o r a h a r d w a r e r e s e t . i n g e n e r a l , a c p u i n t e r f a c i n g t o a d u a r t o p e r a t i n g i n t h e i - m o d e , w i l l f u n c t i o n a s f o l l o w s , d u r i n g i n t e r r u p t s e r v i c i n g . i f t h e d u a r t r e q u i r e s i n t e r r u p t s e r v i c e f r o m t h e c p u , i t w i l l a s s e r t s t h e - i n t r p i n t o t h e c p u . o n c e t h e c p u h a s d e t e c t e d t h e i n t e r r u p t r e q u e s t , i t w i l l d e t e r m i n e t h e l o c a t i o n o f t h e a p p r o p r i a t e i n t e r r u p t s e r v i c e r o u t i n e , a n d w i l l b r a n c h p r o g r a m c o n t r o l t o t h a t l o c a t i o n . t h e c p u w i l l a c c o m p l i s h a l l o f t h i s w i t h o u t p r o v i d i n g a n ? i n t e r r u p t a c k n o w l e d g e ? s i g n a l o r a n y f u r t h e r i n t e r a c t i o n w i t h t h e d u a r t . o n c e t h e c p u h a s e l i m i n a t e d t h e c a u s e ( s ) o f t h e d u a r t ? s i n t e r r u p t r e q u e s t , t h e d u a r t w i l l t h e n n e g a t e i t s - i n t r p i n . t h e c p u w i l l t h e n e x i t t h e ? d u a r t ? i n t e r r u p t s e r v i c e r o u t i n e a n d w i l l r e s u m e n o r m a l p r o c e s s i n g . i n g e n e r a l t h e r e a r e t w o a p p r o a c h e s t h a t c p u s c o m m o n l y u s e t o l o c a t e t h e a p p r o p r i a t e i n t e r r u p t s e r v i c e r o u t i n e , w h e n i n t e r f a c e d w i t h a n i - m o d e d u a r t . d d i r e c t i n t e r r u p t p r o c e s s i n g d ( e x t e r n a l ) v e c t o r e d - i n t e r r u p t p r o c e s s i n g d i r e c t i n t e r r u p t p r o c e s s i n g i f a c p u e m p l o y s ? d i r e c t i n t e r r u p t p r o c e s s i n g ? t h e n o n c e t h e c p u h a s d e t e c t e d t h e i n t e r r u p t r e q u e s t , a n d h a s c o m p l e t e d i t s c u r r e n t i n s t r u c t i o n , t h e c p u w i l l b r a n c h
x r 8 8 c 6 8 1 2 3 r e v . 2 . 1 1 p r o g r a m c o n t r o l t o a s p e c i f i c l o c a t i o n i n s y s t e m m e m o r y . f o r c p u s t h a t e m p l o y d i r e c t i n t e r r u p t s , t h i s ? l o c a t i o n ? i s f i x e d b y t h e c p u c i r c u i t r y i t s e l f . f o r e x a m p l e : i f t h e - i n t 0 i n t e r r u p t r e q u e s t i n p u t p i n , o f t h e 8 0 5 1  c , i s a s s e r t e d , t h e c p u w i l l b r a n c h p r o g r a m c o n t r o l t o l o c a t i o n 0 0 0 3 1 6 i n s y s t e m m e m o r y . t h i s l o c a t i o n i s f i x e d ( b y c i r c u i t d e s i g n o f t h e 8 0 5 1  p ) a n d c a n n o t b e c h a n g e d b y t h e u s e r . ( e x t e r n a l ) v e c t o r e d i n t e r r u p t p r o c e s s i n g c p u s t h a t e m p l o y t h i s f o r m o f i n t e r r u p t p r o c e s s i n g t y p i c a l l y h a v e a n i n t e r r u p t a c k n o w l e d g e o u t p u t p i n . t h i s ? i a c k ? o r ? - i n t a ? o u t p u t w i l l b e u s e d t o g a t e ? i n t e r r u p t v e c t o r ? i n f o r m a t i o n o n t o t h e d a t a b u s , v i a e x t e r n a l ( n o n - d u a r t ) h a r d w a r e . t h e t e r m ? e x t e r n a l ? i s u s e d t o d e s c r i b e t h i s f o r m o f v e c t o r e d - i n t e r r u p t p r o c e s s i n g ; b e c a u s e t h e l o c a t i o n o f t h e i n t e r r u p t s e r v i c e r o u t i n e i s d e t e r m i n e d b y h a r d w a r e ? e x t e r n a l ? t o t h e d u a r t . f o r s o m e c p u s , ( s u c h a s t h e 8 0 8 0 a a n d t h e 8 0 8 5  p ) , t h i s ? i n t e r r u p t v e c t o r ? i n f o r m a t i o n i s a o n e b y t e o p - c o d e f o r a c a l l i n s t r u c t i o n t o a s p e c i a l ? r e s t a r t s u b r o u t i n e ? . t h e l o c a t i o n o f t h i s ? r e s t a r t s u b r o u t i n e ? i s f i x e d b y c p u c i r c u i t d e s i g n . i f t h e u s e r e m p l o y s t h i s a p p r o a c h f o r i n t e r r u p t p r o c e s s i n g , h e / s h e i s r e s p o n s i b l e f o r i n s u r i n g t h a t e i t h e r t h e i n t e r r u p t s e r v i c e r o u t i n e , o r a n u n c o n d i t i o n a l b r a n c h i n s t r u c t i o n ( t o t h e i n t e r r u p t s e r v i c e r o u t i n e ) r e s i d e s a t t h i s l o c a t i o n i n m e m o r y . e a c h o f t h e s e i n t e r r u p t p r o c e s s i n g t e c h n i q u e s w i l l b e p r e s e n t e d i n g r e a t e r d e t a i l i n t h e f o l l o w i n g s e c t i o n s . a s m e n t i o n e d e a r l i e r , t h e d u a r t s h o u l d b e o p e r a t i n g i n t h e i - m o d e , w h e n i n t e r f a c e d t o t h e  p /  c p r e s e n t e d i n t a b l e 7 . t a b l e 7 a l s o p r e s e n t s t h e t y p e o f i n t e r r u p t p r o c e s s i n g t h a t i s e m p l o y e d b y e a c h o f t h e s e  p s /  c s .  p /  c t y p e o f i n t e r r u p t p r o c e s s i n g c o m m e n t s 8 0 5 1  c d i r e c t t h e 8 0 5 1  c h a s t w o e x t e r n a l i n t e r r u p t r e q u e s t i n p u t s : - i n t 0 a n d - i n t 1 . 8 0 8 0 a  p e x t e r n a l v e c t o r e d t h e 8 0 8 0 a  p w i l l a l l o w t h e u s e o f u p t o 8 d i f f e r e n t o p c o d e s f o r ? c a l l ? i n s t r u c t i o n s t o t h e i n t e r r u p t s e r v i c e r o u t i n e s . t h e 8 0 8 0 a c p u m o d u l e w i l l o u t p u t a n i n t e r r u p t a c - k n o w l e d g e o u t p u t , - i n t a , w h i c h c a n b e u s e d t o ? g a t e ? t h e ? c a l l ? i n s t r u c t i o n s o n t o t h e d a t a b u s . 8 0 8 5  p d i r e c t a n d e x t e r n a l v e c t o r e d t h e 8 0 8 5  p h a s t h r e e ? d i r e c t ? e x t e r n a l i n t e r r u p t r e q u e s t i n p u t s : r s t 7 . 5 , r s t 6 . 5 , a n d r s t 5 . 5 . a d d i t i o n a l l y , t h i s  p h a s t h e e x a c t s a m e ? v e c t o r ? o p t i o n s a s d o e s t h e 8 0 8 0 a  p . 6 8 h c 1 1  c d i r e c t t h e 6 8 h c 1 1  c h a s a s i n g l e ? m a s k a b l e ? e x t e r n a l i n t e r r u p t r e q u e s t i n p u t ; - i r q . z - 8 0  p ( i n t e r r u p t m o d e 0 ) e x t e r n a l v e c t o r e d t h e z - 8 0 c p u u s e s t h e e x a c t s a m e a p p r o a c h a s p r e s e n t e d f o r t h e 8 0 8 0 a c p u . z - 8 0  p d i r e c t i n t e r r u p t t h e z - 8 0 w i l l b r a n c h t o 0 0 3 8 h i n s y s t e m m e m o r y i f t h e - i n t i n t e r r u p t r e q u e s t p i n i s a s s e r t e d . t a b l e 7 . s u m m a r y o f  p /  c a n d t h e i r t y p e s o f i n t e r r u p t p r o c e s s i n g ( i - m o d e ) t h e i n f o r m a t i o n p r e s e n t e d i n t a b l e 7 i s d i s c u s s e d i n d e t a i l i n t h e f o l l o w i n g s e c t i o n s .
x r 8 8 c 6 8 1 2 4 r e v . 2 . 1 1 c . 6 . 1 . 1 8 0 5 1 m i c r o c o n t r o l l e r t h e 8 0 5 1 f a m i l y o f m i c r o c o n t r o l l e r s i s m a n u f a c t u r e d b y i n t e l a n d c o m e s w i t h a v a r i e t y o f a m e n i t i e s . s o m e o f t h e s e a m e n i t i e s i n c l u d e : d o n c h i p s e r i a l p o r t d f o u r 8 b i t i / o p o r t ( p 0 - p 3 ) d t w o 1 6 b i t t i m e r s d 4 k b y t e s o f r o m d 1 2 8 b y t e s o f r a m f i g u r e 3 p r e s e n t s a b l o c k d i a g r a m o f t h e 8 0 5 1 m i c r o c o n t r o l l e r , a n d f i g u r e 4 p r e s e n t s t h e p i n o u t o f t h i s d e v i c e . i n t e r r u p t c o n t r o l o t h e r r e g i s t e r s 1 2 8 b y t e s r a m ( 8 0 3 2 / 8 0 5 2 ) 1 2 8 b y t e s r a m r o m 0 k - 8 0 3 1 / 8 0 3 2 4 k - 8 0 5 1 8 k - 8 0 5 2 t i m e r 2 ( 8 0 3 2 / 8 0 5 2 ) t i m e r 1 t i m e r 0 c p u b u s c o n t r o l i / o p o r t s s e r i a l p o r t - r x d - t x d p 0 p 1 p 2 p 3 s e r i a l p o r t t i m e r 0 t i m e r 1 t i m e r 2 ( 8 0 3 2 / 8 0 5 2 ) - i n t 0 - i n t 1 o s c i l l a t o r - t 2 e x - t 2 - t 1 - t 0 - e a r s t a l e - p s e n f i g u r e 3 . b l o c k d i a g r a m o f t h e 8 0 5 1 m i c r o c o n t r o l l e r
x r 8 8 c 6 8 1 2 5 r e v . 2 . 1 1 f i g u r e 4 . p i n o u t o f t h e 8 0 5 1 m i c r o c o n t r o l l e r 1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 0 2 1 2 2 2 3 2 4 2 5 2 6 2 7 2 8 2 9 3 0 3 1 3 2 3 3 3 4 3 5 3 6 3 7 3 8 3 9 4 0 p 1 . 0 p 1 . 1 p 1 . 2 p 1 . 3 p 1 . 4 p 1 . 5 p 1 . 6 p 1 . 7 r s t p 3 . 0 ( r x d ) p 3 . 1 ( t x d ) p 3 . 2 ( - i n t 0 ) p 3 . 3 ( - i n t 1 ) p 3 . 4 ( t 0 ) p 3 . 5 ( t 1 ) p 3 . 6 ( - w r ) p 3 . 7 ( - r d ) x t a l 2 x t a l 1 v s s p 2 . 0 ( a 8 ) p 2 . 1 ( a 9 ) p 2 . 2 ( a 1 0 ) p 2 . 3 ( a 1 1 ) p 2 . 4 ( a 1 2 ) p 2 . 5 ( a 1 3 ) p 2 . 6 ( a 1 4 ) p 2 . 7 ( a 1 5 ) - p s e n a l e - e a p 0 . 7 ( a d 7 ) p 0 . 6 ( a d 6 ) p 0 . 5 ( a d 5 ) p 0 . 4 ( a d 4 ) p 0 . 3 ( a d 3 ) p 0 . 2 ( a d 2 ) p 0 . 1 ( a d 1 ) p 0 . 0 ( a d 0 ) v c c 8 0 5 1 m i c r o c o n t r o l l e r t h e 8 0 5 1  c c o n s i s t s o f 4 8 - b i t i / o p o r t s . s o m e o f t h e s e p o r t s h a v e a l t e r n a t e f u n c t i o n s , a s w i l l b e d i s c u s s e d h e r e . p o r t 0 ( p 0 . 0 - p 0 . 7 ) t h i s p o r t i s a d u a l - p u r p o s e p o r t o n p i n s 3 2 - 3 9 o f t h e 8 0 5 1 i c . i n m i n i m a l c o m p o n e n t d e s i g n s , i t i s u s e d a s a g e n e r a l p u r p o s e i / o p o r t . f o r l a r g e r d e s i g n s w i t h e x t e r n a l m e m o r y , i t b e c o m e s a m u l t i p l e x e d a d d r e s s a n d d a t a b u s ( a d 0 - a d 7 ) . p o r t 1 ( p 1 . 0 - p 1 . 7 ) p o r t 1 i s a d e d i c a t e d i / o p o r t o n p i n s 1 - 8 . t h e p i n s , d e s i g n a t e d a s p 1 . 0 , p 1 . 1 , p 1 . 2 , . . . , a r e a v a i l a b l e f o r i n t e r f a c i n g a s r e q u i r e d . n o a l t e r n a t i v e f u n c t i o n s a r e a s s i g n e d f o r p o r t 1 p i n s ; t h u s t h e y a r e u s e d s o l e l y f o r i n t e r f a c i n g t o e x t e r n a l d e v i c e s . e x c e p t i o n s a r e t h e 8 0 3 2 / 8 0 5 2 i c s , w h i c h u s e p 1 . 0 a n d p 1 . 1 e i t h e r a s i / o l i n e s o r a s e x t e r n a l i n p u t s t o t h e t h i r d t i m e r . p o r t 2 ( p 2 . 0 - p 2 . 7 ) p o r t 2 ( p i n s 2 1 - 2 8 ) i s a d u a l - p u r p o s e p o r t t h a t c a n f u n c t i o n a s g e n e r a l p u r p o s e i / o , o r a s t h e h i g h b y t e o f t h e a d d r e s s b u s f o r d e s i g n s w i t h e x t e r n a l c o d e m e m o r y o f m o r e t h a n 2 5 6 b y t e s o f e x t e r n a l d a t a m e m o r y ( a 8 - a 1 5 ) .
x r 8 8 c 6 8 1 2 6 r e v . 2 . 1 1 p o r t 3 p o r t 3 i s a d u a l - p u r p o s e p o r t o n p i n s 1 0 - 1 7 . i n a d d i t i o n t o f u n c t i o n i n g a s g e n e r a l p u r p o s e i / o , t h e s e p i n s h a v e m u l t i p l e f u n c t i o n s . e a c h o f t h e s e p i n s h a v e a n a l t e r n a t e p u r p o s e , a s l i s t e d i n t a b l e 8 . b i t n a m e a l t e r n a t e f u n c t i o n p 3 . 0 r x d r e c e i v e d a t a f o r s e r i a l p o r t p 3 . 1 t x d t r a n s m i t d a t a f o r s e r i a l p o r t p 3 . 2 - i n t 0 e x t e r n a l i n t e r r u p t 0 p 3 . 3 - i n t 1 e x t e r n a l i n t e r r u p t 1 p 3 . 4 t 0 t i m e r / c o u n t e r 0 e x t e r n a l i n p u t p 3 . 5 t 1 t i m e r / c o u n t e r 1 e x t e r n a l i n p u t p 3 . 6 - w r e x t e r n a l d a t a m e m o r y w r i t e s t r o b e p 3 . 7 - r d e x t e r n a l d a t a m e m o r y r e a d s t r o b e t a b l e 8 . a l t e r n a t e f u n c t i o n s o f p o r t 3 p i n s t h e 8 0 5 1 a l s o h a s n u m e r o u s a d d i t i o n a l p i n s w h i c h a r e r e l e v a n t t o i n t e r f a c i n g t o t h e x r 8 8 c 6 8 1 d u a r t o r o t h e r p e r i p h e r a l s . t h e s e p i n s a r e : a l e - a d d r e s s l a t c h e n a b l e i f p o r t 0 i s u s e d i n i t s a l t e r n a t e m o d e - a s t h e d a t a b u s a n d t h e l o w e r b y t e o f t h e a d d r e s s b u s - - a l e i s t h e s i g n a l t h a t l a t c h e s t h e a d d r e s s i n t o a n e x t e r n a l r e g i s t e r d u r i n g t h e f i r s t h a l f o f a m e m o r y c y c l e . o n c e t h i s i s d o n e , t h e p o r t 0 l i n e s a r e t h e n a v a i l a b l e f o r d a t a i n p u t o r o u t p u t d u r i n g t h e s e c o n d h a l f o f t h e m e m o r y c y c l e , w h e n t h e d a t a t r a n s f e r t a k e s p l a c e . - i n t 0 ( p 3 . 2 ) a n d - i n t 1 ( p 3 . 3 ) - i n t 0 a n d - i n t 1 a r e e x t e r n a l i n t e r r u p t r e q u e s t i n p u t s t o t h e 8 0 5 1  c . e a c h o f t h e s e i n t e r r u p t p i n s s u p p o r t ? d i r e c t i n t e r r u p t ? p r o c e s s i n g . i n t h i s c a s e , t h e t e r m ? d i r e c t ? m e a n s t h a t i f o n e o f t h e s e i n p u t s a r e a s s e r t e d , t h e n p r o g r a m c o n t r o l w i l l a u t o m a t i c a l l y b r a n c h t o a s p e c i f i c ( f i x e d ) l o c a t i o n i n c o d e m e m o r y . t h i s l o c a t i o n i s d e t e r m i n e d b y t h e c i r c u i t d e s i g n o f t h e 8 0 5 1  c i c a n d c a n n o t b e c h a n g e d . t a b l e 9 p r e s e n t s t h e l o c a t i o n ( i n c o d e m e m o r y ) t h a t t h e p r o g r a m c o n t r o l w i l l b r a n c h t o , i f e i t h e r o f t h e s e i n p u t s a r e a s s e r t e d . i n t e r r u p t l o c a t i o n - i n t 0 - i n t 1 0 0 0 3 h 0 0 1 3 h t a b l e 9 . i n t e r r u p t s e r v i c e r o u t i n e l o c a t i o n s ( i n c o d e m e m o r y ) f o r - i n t 0 a n d - i n t 1 t h e r e f o r e , i f t h e u s e r i s u s i n g e i t h e r o n e o f t h e s e i n p u t s a s a n i n t e r r u p t r e q u e s t i n p u t , t h e n t h e u s e r m u s t i n s u r e t h a t t h e a p p r o p r i a t e i n t e r r u p t s e r v i c e r o u t i n e o r a n u n c o n d i t i o n a l b r a n c h i n s t r u c t i o n ( t o t h e i n t e r r u p t s e r v i c e r o u t i n e ) i s l o c a t e d a t o n e o f t h e s e a d d r e s s l o c a t i o n s . i f t h e 8 0 5 1  c i s r e q u i r e d t o i n t e r f a c e t o e x t e r n a l c o m p o n e n t s i n t h e d a t a m e m o r y s p a c e o f s i z e s g r e a t e r t h a n 2 5 6 b y t e s , t h e n b o t h p o r t s 0 a n d p o r t 2 m u s t b e u s e d a s t h e a d d r e s s a n d d a t a l i n e s . p o r t 0 w i l l f u n c t i o n a s a m u l t i p l e x e d a d d r e s s / d a t a b u s . d u r i n g t h e f i r s t h a l f o f a m e m o r y c y c l e , p o r t 0 w i l l o p e r a t e a s t h e l o w e r a d d r e s s b y t e . d u r i n g t h e s e c o n d h a l f o f t h e m e m o r y c y c l e p o r t 0 w i l l o p e r a t e a s t h e b i - d i r e c t i o n a l d a t a b u s . p o r t 2 w i l l b e u s e d a s t h e u p p e r a d d r e s s b y t e . a l e a n d t h e u s e o f a 7 4 l s 3 7 3 t r a n s p a r e n t l a t c h d e v i c e c a n b e u s e d t o d e m u l t i p l e x t h e a d d r e s s a n d d a t a b u s s i g n a l s . f i g u r e 5 p r e s e n t s a s c h e m a t i c i l l u s t r a t i n g h o w t h e x r 8 8 c 6 8 1 d u a r t c a n b e i n t e r f a c e d t o t h e 8 0 5 1  c .
x r 8 8 c 6 8 1 2 7 r e v . 2 . 1 1 - i n t 0 - r d - w r a l e p o r t 0 ( a d 0 - a d 7 ) p o r t 2 ( a 8 - a 1 5 ) - i n t r - r d - w r d 0 - d 7 a 0 - a 3 7 4 h c 3 7 3 c d q a d d r e s s d e c o d i n g l o g i c - c s 8 0 5 1 c p u x r 8 8 c 6 8 1 c s _ d u a r t t o o t h e r i c s a 0 - a 3 a 5 - a 7 f i g u r e 5 . a n a p p r o a c h t o i n t e r f a c i n g t h e x r 8 8 c 6 8 1 d u a r t t o t h e 8 0 5 1 m i c r o c o n t r o l l e r t h e c i r c u i t r y p r e s e n t e d f i g u r e 5 w o u l d f u n c t i o n a s f o l l o w s d u r i n g a d u a r t r e q u e s t e d i n t e r r u p t . t h e d u a r t d e v i c e r e q u e s t s a n i n t e r r u p t f r o m t h e c p u b y a s s e r t i n g i t s a c t i v e l o w - i n t r o u t p u t p i n . t h i s w i l l c a u s e t h e - i n t 0 i n p u t p i n t o t h e c p u t o g o l o w . w h e n t h i s h a p p e n s t h e 8 0 5 1 c p u w i l l f i n i s h e x e c u t i n g i t s c u r r e n t i n s t r u c t i o n , a n d w i l l t h e n b r a n c h p r o g r a m c o n t r o l t o t h e d u a r t i n t e r r u p t s e r v i c e r o u t i n e . i n t h e c a s e o f f i g u r e 5 , s i n c e t h e d u a r t ? s - i n t r p i n i s t i e d t o t h e - i n t 0 p i n o f t h e  c , t h e n t h e b e g i n n i n g o f t h e i n t e r r u p t s e r v i c e r o u t i n e w i l l b e l o c a t e d i n 0 0 0 3 h i n c o d e m e m o r y . t h e 8 0 5 1 c p u d o e s n o t i s s u e a n i n t e r r u p t a c k n o w l e d g e s i g n a l b a c k t o t h e d u a r t . i t w i l l j u s t b e g i n p r o c e s s i n g t h r o u g h t h e d u a r t ? s i n t e r r u p t s e r v i c e r o u t i n e . o n c e t h e c p u h a s e l i m i n a t e d t h e c a u s e ( s ) o f t h e i n t e r r u p t r e q u e s t , t h e d u a r t ? s - i n t r p i n w i l l b e n e g a t e d ( g o ? h i g h ? ) a n d t h e c p u w i l l r e t u r n f r o m t h e i n t e r r u p t s e r v i c e r o u t i n e a n d r e s u m e n o r m a l o p e r a t i o n . c . 6 . 1 . 2 8 0 8 0 a m i c r o p r o c e s s o r t h e 8 0 8 0 a m i c r o p r o c e s s o r i s o n e o f t h e e a r l i e r v e r s i o n o f t h e i n t e l p r o c e s s o r s . i n g e n e r a l , i t i s a n 8 - b i t m i c r o p r o c e s s o r t h a t r e q u i r e s + 5 v , - 5 v , a n d + 1 2 v p o w e r s u p p l i e s . a d d i t i o n a l l y , t h i s m i c r o p r o c e s s o r r e q u i r e s t w o o t h e r c h i p s , i n o r d e r t o c r e a t e a ? c o m p l e t e ? c p u m o d u l e . t y p i c a l l y , t h e s e d e v i c e s w o u l d b e t h e 8 2 2 4 c l o c k g e n e r a t o r a n d t h e 8 2 2 8 s y s t e m c o n t r o l l e r . t h e 8 2 2 4 c l o c k g e n e r a t o r i s r e s p o n s i b l e f o r c o n d i t i o n i n g a n d g e n e r a t i n g t h e n e c e s s a r y t i m i n g s o u r c e f o r t h e 8 0 8 0 a
x r 8 8 c 6 8 1 2 8 r e v . 2 . 1 1 c p u , f r o m a e x t e r n a l c r y s t a l . t h e 8 2 2 8 s y s t e m c o n t r o l l e r i s r e s p o n s i b l e f o r b u f f e r i n g t h e b i - d i r e c t i o n a l d a t a b u s . a d d i t i o n a l l y , s i n c e t h e 8 0 8 0 c p u d e v i c e d o e s n o t d i r e c t l y p r o v i d e c o n t r o l b u s s i g n a l s , t h e 8 2 2 8 d e v i c e i s r e s p o n s i b l e f o r t r a n s l a t i n g s i g n a l i n g i n f o r m a t i o n , f r o m t h e 8 0 8 0 a d e v i c e , i n t o t h e f o l l o w i n g c o n t r o l b u s s i g n a l s ; i n o r d e r t o a c c e s s m e m o r y a n d p e r i p h e r a l d e v i c e s . - i n t a - i n t e r r u p t a c k n o w l e d g e - m e m r - m e m o r y r e a d - m e m w - m e m o r y w r i t e - i o r - i n p u t p o r t r e a d - i o w - o u t p u t p o r t w r i t e f i g u r e 6 p r e s e n t s a s c h e m a t i c o f t h e 8 0 8 0 a c p u m o d u l e . p h i 2 ( t t l ) i n t i n t e d 0 d 1 d 2 d 3 d 4 d 5 d 6 d 7 8 0 8 0 a c p u 8 2 2 8 s y s t e m c o n t r o l l e r i n t a d b i n 8 2 2 4 c l o c k g e n e r a t o r m e m r m e m w i o r i o w a 0 - a 1 5 - b u s e n - s t a t u s s t r o b e h d l a - w r s y n c t a n k o s c r d y i n - r e s i n + 1 2 v + 5 v g n d r e s e t r e a d y 1 2 w a i t g n d + 5 v g n d + 5 v - 5 v + 1 2 v h o l d d 0 d 1 d 2 d 3 d 4 d 5 d 6 d 7 f i g u r e 6 . s c h e m a t i c o f 8 0 8 0 a c p u m o d u l e 8 0 8 0 a c p u m o d u l e i n t e r r u p t s t r u c t u r e t h e ? i n t e r r u p t s t r u c t u r e ? o f t h e 8 0 8 0 a c p u i s d e s c r i b e d h e r e . t h e 8 0 8 0 a c p u d e v i c e c o n s i s t s o f t w o s i g n a l s : i n t e a n d i n t . a d d i t i o n a l l y , t h e 8 2 2 8 b i - d i r e c t i o n a l b u s c o n s i s t s o f a s i n g l e o u t p u t s i g n a l , - i n t a . i n t e i s t h e a c t i v e - h i g h i n t e r r u p t e n a b l e o u t p u t , a n d i n t i s t h e a c t i v e - h i g h i n t e r r u p t r e q u e s t i n p u t . i f t h e ? e n a b l e i n t e r r u p t ? c o m m a n d h a s b e e n i n v o k e d , t h e i n t e o u t p u t w i l l b e ? h i g h ? i n d i c a t i n g t h a t t h e 8 0 8 0 c p u w i l l h o n o r i n t e r r u p t r e q u e s t s f r o m p e r i p h e r a l s . w h e n e v e r t h e i n t p i n i s a s s e r t e d b y a p e r i p h e r a l d e v i c e r e q u e s t i n g a n i n t e r r u p t , t h e c p u w i l l c o m p l e t e i t s c u r r e n t i n s t r u c t i o n . a f t e r c o m p l e t i o n o f t h i s i n s t r u c t i o n , t h e c p u m o d u l e w i l l a s s e r t - i n t a v i a t h e 8 2 2 8 b i - d i r e c t i o n a l b u s d r i v e r ( u 2 ) b y t o g g l i n g - i n t a ? l o w ? . - i n t a i s t h e a c t i v e - l o w ? i n t e r r u p t a c k n o w l e d g e ? s i g n a l t h a t t h e c p u m o d u l e o u t p u t s i n o r d e r t o i n i t i a t e t h e p r o c e s s o f i n t e r r u p t s e r v i c i n g . t h e 8 0 8 0 a c p u m o d u l e o n l y s u p p o r t s ? e x t e r n a l ?
x r 8 8 c 6 8 1 2 9 r e v . 2 . 1 1 v e c t o r e d - i n t e r r u p t p r o c e s s i n g . h e n c e , w h e n - i n t a i s a s s e r t e d , t h e c p u m o d u l e i s a w a i t i n g ? v e c t o r ? i n f o r m a t i o n o n t h e d a t a b u s . i n t h e c a s e o f t h e 8 0 8 0 a c p u m o d u l e , t h i s ? v e c t o r ? i n f o r m a t i o n i s t y p i c a l l y t h e o p - c o d e f o r o n e o f t h e r e s t a r t i n s t r u c t i o n s ( r s t ) . t h e 8 0 8 0 a c p u s u p p o r t s u p t o e i g h t d i f f e r e n t r s t i n s t r u c t i o n s ( r s t 0 t h r o u g h r s t 7 ) . t h e s e i n s t r u c t i o n s a r e o n e - b y t e c a l l s t o s p e c i f i c l o c a t i o n s w i t h i n t h e c p u ? s m e m o r y s p a c e , w h e r e t h e a p p r o p r i a t e i n t e r r u p t s e r v i c e r o u t i n e e x i s t s . t a b l e 1 0 p r e s e n t s a l i s t o f t h e s e r e s t a r t i n s t r u c t i o n s , t h e o p - c o d e s , a n d t h e c o r r e s p o n d i n g r e s t a r t a d d r e s s . o p - c o d e ( h e x ) m n e m o n i c r e s t a r t a d d r e s s ( h e x ) c 7 r s t 0 0 0 0 0 c f r s t 1 0 0 0 8 d 7 r s t 2 0 0 1 0 d f r s t 3 0 0 1 8 e 7 r s t 4 0 0 2 0 e f r s t 5 0 0 2 8 f 7 r s t 6 0 0 3 0 f f r s t 7 0 0 3 8 t a b l e 1 0 . 8 0 8 0 a a n d 8 0 8 5 c p u r e s t a r t i n s t r u c t i o n s u s e d w i t h v e c t o r e d i n t e r r u p t s t h e r e f o r e , o n c e t h e c p u r e c e i v e s t h e o p - c o d e f o r o n e o f t h e s e r e s t a r t i n s t r u c t i o n s , i t w i l l b e g i n e x e c u t i n g t h i s i n s t r u c t i o n b y l o a d i n g t h e p r o g r a m c o u n t e r w i l l t h e a p p r o p r i a t e ? r e s t a r t a d d r e s s ? . a f t e r w a r d s , p r o g r a m c o n t r o l w i l l b e b r a n c h e d t o t h e ? r e s t a r t a d d r e s s ? l o c a t i o n . f o r e x a m p l e : i f t h e o p - c o d e ? e 7 1 6 ? i s l o a d e d o n t o t h e d a t a b u s d u r i n g t h e - i n t a c y c l e , t h i s o p - c o d e c o r r e s p o n d s w i t h t h e ? r s t 4 ? c o m m a n d a n d , t h e c p u w i l l l o a d 0 0 2 0 1 6 i n t o t h e p r o g r a m c o u n t e r a n d p r o g r a m c o n t r o l w i l l b r a n c h t o t h a t l o c a t i o n i n m e m o r y ( s e e t a b l e 1 0 ) . i n t e r f a c i n g t h e 8 0 8 0 c p u m o d u l e t o t h e x r 8 8 c 6 8 1 d u a r t f o r i n t e r r u p t p r o c e s s i n g t h e 8 0 8 0 a c p u c a n b e c o n n e c t e d t o t h e x r 8 8 c 6 8 1 a n d r u n i n t h e i n t e r r u p t d r i v e n m o d e . f i g u r e 7 p r e s e n t s a n a p p r o a c h t h a t c a n b e a p p l i e d t o i n t e r f a c i n g t h e x r 8 8 c 6 8 1 d u a r t t o t h e 8 0 8 0 a c p u f o r ? e x t e r n a l ? v e c t o r e d i n t e r r u p t p r o c e s s i n g . p l e a s e n o t e t h a t f i g u r e 8 o n l y i n c l u d e s i n f o r m a t i o n p e r t a i n i n g t o d u a r t i n t e r r u p t s e r v i c i n g . o t h e r c i r c u i t r y ( s u c h a s t h e 8 2 2 4 c l o c k g e n e r a t o r , t h e a d d r e s s b u s , e t c . ) h a v e b e e n o m i t t e d f r o m t h e s c h e m a t i c . i n t h i s s c h e m a t i c , t h e d u a r t i n t e r r u p t s e r v i c e r o u t i n e i s l o c a t e d a t 0 0 2 0 1 6 i n m e m o r y . a d d i t i o n a l l y , t h e d u a r t h a s b e e n c o n f i g u r e d t o o p e r a t e i n t h e i - m o d e . t h e f u n c t i o n d e s c r i p t i o n o f t h i s c i r c u i t i s p r e s e n t e d h e r e . t h e x r 8 8 c 6 8 1 w i l l r e q u e s t a n i n t e r r u p t t o t h e 8 0 8 0 a c p u , b y t o g g l i n g i t s - i n t r o u t p u t ? l o w ? . t h i s s i g n a l i s i n v e r t e d a n d a p p l i e d t o t h e a c t i v e - h i g h i n t i n p u t o f t h e c p u . o n c e t h e 8 0 8 0 a c p u h a s c o m p l e t e d i t s c u r r e n t i n s t r u c t i o n , i t w i l l a s s e r t t h e a c t i v e - l o w - i n t a s i g n a l ( f r o m t h e 8 2 2 8 b i - d i r e c t i o n a l b u s d r i v e r ) . a t t h i s t i m e , b o t h t h e - i n t r s i g n a l ( f r o m t h e d u a r t ) a n d t h e - i n t a s i g n a l ( f r o m t h e 8 2 2 8 ) a r e e a c h a t a l o g i c ? l o w ? . t h e - i n t r a n d - i n t a s i g n a l s a r e b o t h r o u t e d t o a t w o - i n p u t o r g a t e . h e n c e , w h e n b o t h - i n t r a n d - i n t a a r e a t l o g i c ? l o w ? , t h e o u t p u t o f t h e o r - g a t e w i l l a l s o b e a t a l o g i c ? l o w ? , a n d t h e r e b y a s s e r t i n g b o t h o f t h e o u t p u t e n a b l e ( o e ) i n p u t s o f t h e s n 7 4 l s 2 4 4 d a t a b u s b u f f e r ( u 3 ) . t h i s ? o r i n g ? o f t h e - i n t r a n d - i n t a s i g n a l s i s u s e d t o i n s u r e t h a t o n l y t h e p e r i p h e r a l d e v i c e r e q u e s t i n g t h e i n t e r r u p t i s t h e o n e t h a t r e c e i v e s t h e s e r v i c e ( e . g . , r e s p o n s i v e t o t h e a s s e r t e d - i n t a s i g n a l ) . o n c e b o t h - o e i n p u t s o f u 3 a r e a s s e r t e d , t h e d a t a , a p p l i e d a t t h e i n p u t o f t h i s d e v i c e ( u 3 ) w i l l n o w a p p e a r a t t h e o u t p u t o f t h i s d e v i c e , a n d a t t h e d 7 - d 0 i n p u t s o f t h e 8 2 2 8 d e v i c e ( u 2 ) . p l e a s e n o t e t h a t , i n t h i s e x a m p l e , t h e v a l u e ? e 7 1 6 ? i s h a r d - w i r e d i n t o t h e i n p u t o f u 3 . t h i s v a l u e i s t h e o p - c o d e f o r t h e ? r s t 4 ? c o m m a n d . h e n c e , o n c e t h i s d a t a i s g a t e d i n t o t h e c p u m o d u l e , v i a t h e d a t a b u s , t h e c p u w i l l l o a d 0 0 2 0 1 6 i n t o i t s p r o g r a m c o u n t e r a n d b r a n c h p r o g r a m c o n t r o l t o t h a t l o c a t i o n . t h e i n t e r r u p t s e r v i c e r o u t i n e f o r t h e d u a r t e x i s t s a t t h i s l o c a t i o n i n m e m o r y .
x r 8 8 c 6 8 1 3 0 r e v . 2 . 1 1 i n t i n t e d 0 d 1 d 2 d 3 d 4 d 5 d 6 d 7 8 0 8 0 a c p u 8 2 2 8 b i - d i r e c t i o n a l b u s d r i v e r x r 8 8 c 6 8 1 d u a r t - i n t r i n t a v c c d b i n u 1 u 2 u 3 u 4 u 5 u 6 f i g u r e 7 . c i r c u i t s c h e m a t i c d e p i c t i n g a p p r o a c h t o i n t e r f a c e t h e x r 8 8 c 6 8 1 d u a r t t o t h e 8 0 8 0 a c p u , f o r ? e x t e r n a l ? v e c t o r e d i n t e r r u p t p r o c e s s i n g ( i n t e r r u p t s e r v i c e r o u t i n e r e s i d e s a t 0 0 2 0 1 6 i n m e m o r y ) v c c s n 7 4 l s 2 4 4 - o e 1 - o e 2 d i 0 d i 1 d i 2 d i 3 d i 4 d i 5 d i 6 d i 7 d o 0 d o 1 d o 2 d o 3 d o 4 d o 5 d o 6 d o 7 s i n c e t h e 8 0 8 0 a c p u c a n s u p p o r t u p t o 8 d i f f e r e n t r s t i n s t r u c t i o n s , i t c a n s u p p o r t u p t o 8 d i f f e r e n t i n t e r r u p t - d r i v e n p e r i p h e r a l d e v i c e s . t h i s c a n b e a c h i e v e d b y r e p l i c a t i n g t h e a p p r o a c h , p r e s e n t e d i n f i g u r e 7 , a n d b y h a r d w i r i n g t h e o p - c o d e s f o r e a c h o f t h e r e s t a r t i n s t r u c t i o n s t o t h e i n p u t s o f t h e d a t a b u f f e r s ( s e e t a b l e 1 0 ) . t h e s e d a t a b u f f e r s s h o u l d b e e n a b l e d o n l y d u r i n g t h e - i n t a c y c l e , a n d o n l y w h e n t h e i r a s s o c i a t e d p e r i p h e r a l r e q u e s t e d t h e i n t e r r u p t s e r v i c e . c . 6 . 1 . 3 8 0 8 5 m i c r o p r o c e s s o r t h e 8 0 8 5 c p u i s a n o t h e r e a r l y i n t e l m i c r o p r o c e s s o r , a l t h o u g h i t i s m o r e a d v a n c e d t h a n t h e 8 0 8 0 a c p u . s o m e o f t h e a d v a n c e m e n t s t h a t w e r e m a d e i n t h e t r a n s i t i o n f r o m t h e 8 0 8 0 a t o t h e 8 0 8 5 i n c l u d e c o m b i n i n g t h e c l o c k g e n e r a t o r f u n c t i o n s o f t h e 8 2 2 4 o n t o t h e c p u c h i p , a d d i n g a n o n - m a s k a b l e i n t e r r u p t r e q u e s t , a d d i n g 3 ? d i r e c t ? i n t e r r u p t r e q u e s t i n p u t p i n s , a n d a d d i n g s o m e f o r m o f i n t e r r u p t p r i o r i t y . t h e 8 0 8 5 s t i l l r e q u i r e s s o m e g l u e l o g i c i n o r d e r t o p r o d u c e t h e c o n t r o l b u s s i g n a l s ( i . e . , - i o r , - i o w , - m e m r , - m e m w ) . f u r t h e r , i n o r d e r t o m i n i m i z e p i n c o u n t , t h e 8 0 8 5 c o n t a i n s a m u l t i p l e x e d a d d r e s s / d a t a b u s ( a d 0 - a d 7 ) . s p e c i f i c a l l y , t h e l o w e r 8 b i t s o f t h e a d d r e s s b u s s h a r e p i n s w i t h t h e 8 b i t d a t a b u s . h e n c e , a 7 4 l s 3 7 3 8 - b i t l a t c h i s n e e d e d i n o r d e r t o d e m u l t i p l e x t h e a d d r e s s a n d d a t a b u s e s .
x r 8 8 c 6 8 1 3 1 r e v . 2 . 1 1 f i g u r e 8 p r e s e n t s a s c h e m a t i c o f t h e 8 0 8 5 c p u m o d u l e . x 1 x 2 a d 0 a d 1 a d 2 a d 3 a d 4 a d 5 a d 6 a d 7 d 0 d 1 d 2 d 3 d 4 d 5 d 6 d 7 1 d 2 d 3 d 4 d 5 d 6 d 7 d 8 d 1 q 2 q 3 q 4 q 5 q 6 q 7 q 8 q c a 0 a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 a 1 0 a 1 1 a 1 2 a 1 3 a 1 4 a 1 5 a l e t r a p r s t 7 . 5 r s t 6 . 5 r s t 5 . 5 i n t r - i n t a a 8 a 9 a 1 0 a 1 1 a 1 2 a 1 3 a 1 4 a 1 5 - i o / m - r d - w r - i o r - m e m r - i o w - m e m w f i g u r e 8 . a s c h e m a t i c o f t h e 8 0 8 5 c p u m o d u l e 8 0 8 5 c p u 7 4 l s 3 7 3 f i g u r e 9 i l l u s t r a t e s a n a p p r o a c h t o i n t e r f a c i n g t h e x r 8 8 c 6 8 1 d u a r t t o t h e 8 0 8 5 c p u m o d u l e . n o t e t h a t t h e x r 8 8 c 6 8 1 d u a r t , i n t h i s c a s e , i s m e m o r y m a p p e d ( e . g . , t h e s i g n a l s - m e m r a n d - m e m w o f t h e c p u m o d u l e a r e c o n n e c t e d t o t h e - r d a n d - w r p i n s o f t h e d u a r t ) . h o w e v e r , t h e u s e r c o u l d h a v e j u s t a s e a s i l y c o n n e c t e d t h e x r 8 8 c 6 8 1 d e v i c e t o t h e c p u m o d u l e ? s i / o p o r t ( e . g , t h e s i g n a l - i o r a n d - i o w o f t h e c p u m o d u l e a r e c o n n e c t e d t o t h e - r d a n d - w r p i n s o f t h e d u a r t , r e s p e c t i v e l y ) .
x r 8 8 c 6 8 1 3 2 r e v . 2 . 1 1 x 1 x 2 t r a p r s t 7 . 5 r s t 6 . 5 r s t 5 . 5 i n t r - i n t a 8 0 8 5 c p u - i o / m - r d - w r - m e m r a l e c a d 0 - a d 7 a 8 - a 1 5 a d d r e s s d e c o d e r a 0 - a 3 a 4 - a 7 a 8 - a 1 5 d 0 - d 7 a 0 - a 3 - c s 7 4 l s 3 7 3 1 d - 8 d 1 q - 8 q - r d - w r x r 8 8 c 6 8 1 - m e m w - c s _ d u a r t - c s _ o t h e r _ i c f i g u r e 9 . s c h e m a t i c o f t h e x r 8 8 c 6 8 1 i n t e r f a c e t o t h e 8 0 8 5 c p u m o d u l e ( m e m o r y m a p p e d ) . t h e d u a r t ? s - i n t r p i n w a s d e l i b e r a t e l y o m i t t e d f r o m f i g u r e 9 , b e c a u s e i t s u s e w i l l b e a d d r e s s e d i n f i g u r e 1 0 a n d f i g u r e 1 1 . 8 0 8 5 c p u m o d u l e i n t e r r u p t s t r u c t u r e t h e 8 0 8 5 c p u s u p p o r t s b o t h d i r e c t a n d ? e x t e r n a l ? v e c t o r e d i n t e r r u p t p r o c e s s i n g . t h e 8 0 8 5 h a s 4 m a s k a b l e i n t e r r u p t r e q u e s t i n p u t s ( r s t 5 . 5 , r s t 6 . 5 , r t s 7 . 5 , a n d i n t r ) , a n d 1 n o n - m a s k a b l e i n t e r r u p t r e q u e s t i n p u t ( t r a p ) . w h e n d i s c u s s i n g i n t e r f a c i n g f o r t h e i n t e r r u p t s e r v i c i n g o f p e r i p h e r a l d e v i c e s s u c h a s t h e d u a r t , w e a r e o n l y c o n c e r n e d w i t h t h e m a s k a b l e i n t e r r u p t r e q u e s t i n p u t s . o f t h e f o u r m a s k a b l e i n t e r r u p t r e q u e s t i n p u t s ; t h r e e o f t h e s e i n p u t s s u p p o r t ? d i r e c t i n t e r r u p t ? p r o c e s s i n g . t h e r e m a i n i n g o n e i n t e r r u p t r e q u e s t s u p p o r t s ? e x t e r n a l v e c t o r e d i n t e r r u p t ? p r o c e s s i n g . t a b l e 1 1 l i s t s t h e s e i n t e r r u p t r e q u e s t i n p u t s a n d t h e i r c h a r a c t e r i s t i c s / f e a t u r e s .
x r 8 8 c 6 8 1 3 3 r e v . 2 . 1 1 i n p u t n a m e t r i g g e r p r i o r i t y t y p e a c k n o w l e d g e s i g n a l ? a d d r e s s ( h e x ) r s t 7 . 5 p o s i t i v e e d g e t r i g g e r e d 2 d i r e c t n o n e 0 0 3 c r s t 6 . 5 h i g h l e v e l u n t i l s a m p l e d 3 d i r e c t n o n e 0 0 3 4 r s t 5 . 5 h i g h l e v e l u n t i l s a m p l e d 4 d i r e c t n o n e 0 0 2 c i n t r h i g h l e v e l u n t i l s a m p l e d 5 e x t e r n a l v e c t o r e d - i n t a = ? l o w ? s e e t a b l e 1 0 t a b l e 1 1 . 8 0 8 5 c p u m a s k a b l e i n t e r r u p t r e q u e s t i n p u t s a n d t h e i r f e a t u r e s d i r e c t i n t e r r u p t s t h e 8 0 8 5 c p u i n p u t s r s t 7 . 5 , r s t 6 . 5 , a n d r s t 5 . 5 a r e ? d i r e c t i n t e r r u p t ? r e q u e s t i n p u t s . s p e c i f i c a l l y , i f a n y o f t h e s e i n p u t s a r e a s s e r t e d , t h e n t h e p r o g r a m c o u n t e r o f t h e c p u i s , u p o n c o m p l e t i o n o f t h e c u r r e n t i n s t r u c t i o n , a u t o m a t i c a l l y l o a d e d w i t h a m e m o r y l o c a t i o n ( p r e - d e t e r m i n e d b y t h e c i r c u i t r y w i t h i n t h e 8 0 8 5 d e v i c e ) , a n d b r a n c h e s p r o g r a m c o n t r o l t o t h a t l o c a t i o n . t h e s e ? d i r e c t ? i n t e r r u p t s d o n o t p r o v i d e t h e p e r i p h e r a l d e v i c e w i t h a n y s o r t o f ? i n t e r r u p t a c k n o w l e d g e ? . h e n c e , a c c o r d i n g t o t a b l e 1 1 , i f t h e r s t 7 . 5 i n p u t w e r e a s s e r t e d , t h e v a l u e ? 0 0 3 c 1 6 ? w o u l d b e l o a d e d i n t o t h e p r o g r a m c o u n t e r o f t h e c p u , a n d p r o g r a m c o n t r o l w o u l d b r a n c h t o t h a t l o c a t i o n i n m e m o r y . t h e u s e r i s r e s p o n s i b l e t o i n s u r e t h a t t h e c o r r e c t i n t e r r u p t s e r v i c e r o u t i n e b e g i n s a t t h a t l o c a t i o n i n m e m o r y . t h e 8 0 8 5 c p u o f f e r s i n t e r r u p t p r i o r i t i z a t i o n , w i t h i n t h e s e t o f m a s k a b l e i n t e r r u p t s . t h i s p r i o r i t y i s r e f l e c t e d t a b l e 1 1 . i t s h o u l d b e n o t e d t h a t t h e s e p r i o r i t y l e v e l s o n l y a p p l y t o ? p e n d i n g ? i n t e r r u p t r e q u e s t . o n c e a p a r t i c u l a r i n t e r r u p t h a s ? l e f t t h e q u e u e ? a n d i s b e i n g s e r v i c e d b y t h e c p u , t h i s p r i o r i t i z a t i o n s c h e m e n o l o n g e r a p p l i e s t o t h a t p a r t i c u l a r i n t e r r u p t . c o n s e q u e n t l y , i t i s p o s s i b l e t h a t a n r s t 5 . 5 i n t e r r u p t r e q u e s t c o u l d ? i n t e r r u p t ? t h e i n t e r r u p t s e r v i c e r o u t i n e f o r t h e h i g h e r p r i o r i t y r s t 7 . 5 i n t e r r u p t r e q u e s t . t h e r e f o r e , t h e u s e r m u s t g u a r d a g a i n s t t h i s p h e n o m e n o n i n h i s / h e r f i r m w a r e . t a b l e 1 1 a l s o i n d i c a t e s t h a t t h e 8 0 8 5 c p u w i l l s u p p o r t ? e x t e r n a l ? v e c t o r e d i n t e r r u p t s . t h e m a n n e r a n d c o m m a n d s t h a t a r e u s e d i n e x t e r n a l v e c t o r e d i n t e r r u p t p r o c e s s i n g a r e i d e n t i c a l t o t h a t p r e s e n t e d f o r t h e 8 0 8 0 c p u ( s e e s e c t i o n c . 6 . 1 . 2 ) . f i g u r e 1 0 a n d f i g u r e 1 1 p r e s e n t t w o d i f f e r e n t a p p r o a c h e s t h a t c a n b e u s e d t o i n t e r f a c e t h e x r 8 8 c 6 8 1 d u a r t t o t h e 8 0 8 5 c p u . f i g u r e 1 0 p r e s e n t s a s c h e m a t i c w h e r e t h e d u a r t w i l l r e q u e s t a ? d i r e c t ? r s t 6 . 5 i n t e r r u p t t o t h e 8 0 8 5 c p u . i n t h i s c a s e , t h e i n t e r r u p t s e r v i c e r o u t i n e f o r t h e d u a r t m u s t b e g i n a t 0 0 3 4 1 6 i n s y s t e m m e m o r y . t h i s i s a v e r y s i m p l e i n t e r f a c e t e c h n i q u e , b e c a u s e t h e r e i s n o ? i n t e r r u p t a c k n o w l e d g e ? s i g n a l t o r o u t e a n d i n t e r f a c e .
x r 8 8 c 6 8 1 3 4 r e v . 2 . 1 1 v c c a d 0 - a d 7 d 0 - d 7 - i n t r r s t 6 . 5 7 4 l s 3 7 3 a l e a d d r e s s d e c o d i n g l o g i c a 0 - a 3 a 1 5 - a 8 - c s 8 0 8 5 c p u x r 8 8 c 6 8 1 a 7 - a 4 c - i o r - m e m r - i o w - m e m w - i o / m - r d - w r - w r - r d d q f i g u r e 1 0 . t h e x r 8 8 c 6 8 1 / 8 0 8 5 c p u i n t e r f a c e f o r d i r e c t i n t e r r u p t p r o c e s s i n g ( i n t e r r u p t s e r v i c e r o u t i n e i s l o c a t e d a t 0 0 3 4 1 6 i n s y s t e m m e m o r y ) f i g u r e 1 1 p r e s e n t s a s c h e m a t i c w h e r e t h e d u a r t w i l l r e q u e s t a ? e x t e r n a l - v e c t o r e d ? i n t e r r u p t t o t h e 8 0 8 5 c p u . i n t h i s c a s e , t h e i n t e r r u p t s e r v i c e r o u t i n e f o r t h e d u a r t m u s t b e g i n a t 0 0 2 0 1 6 i n s y s t e m m e m o r y .
x r 8 8 c 6 8 1 3 5 r e v . 2 . 1 1 f i g u r e 1 1 . t h e x r 8 8 c 6 8 1 / 8 0 8 5 c p u i n t e r f a c e f o r v e c t o r e d i n t e r r u p t p r o c e s s i n g ( i n - t e r r u p t s e r v i c e r o u t i n e i s l o c a t e d a t 0 0 2 0 1 6 i n s y s t e m m e m o r y ) u 1 u 4 i n t r v c c - i n t r s n 7 4 l s 2 4 4 v c c - o e 1 - o e 2 d i 0 d i 1 d i 2 d i 3 d i 4 d i 5 d i 6 d i 7 d o 0 d o 1 d o 2 d o 3 d o 4 d o 5 d o 6 d o 7 u 3 u 5 u 6 - i n t a d 0 d 1 d 2 d 3 d 4 d 5 d 6 d 7 a d 7 1 d 2 d 3 d 4 d 5 d 6 d 7 d 8 d 1 q 2 q 3 q 4 q 5 q 6 q 7 q 8 q c a 0 a 1 a 2 a 3 a 4 a 5 a 6 a 7 a l e a d 0 a d 1 a d 2 a d 3 a d 4 a d 5 a d 6 8 0 8 5 c p u x r 8 8 c 6 8 1 7 4 l s 3 7 3 c . 6 . 1 . 4 6 8 h c 1 1 m i c r o c o n t r o l l e r m o t o r o l a m a n u f a c t u r e s a f a m i l y o f m i c r o c o n t r o l l e r s , r e f e r r e d t o a s t h e m c 6 8 h c 1 1 m i c r o c o n t r o l l e r s . t h i s f a m i l y o f m i c r o c o n t r o l l e r s o f f e r s s o m e o f t h e f o l l o w i n g a m e n i t i e s : d 5 m u l t i - f u n c t i o n p a r a l l e l p o r t s d r o m o r e p r o m d r a m d a / d c o n v e r t e r
x r 8 8 c 6 8 1 3 6 r e v . 2 . 1 1 f i g u r e 1 2 p r e s e n t s t h e b l o c k d i a g r a m o f t h e m c 6 8 h c 1 1  c . p o r t b p o r t c c o n t r o l p o r t d c o n t r o l m o d e c o n t r o l i n t e r r u p t l o g i c r a m 2 5 6 b y t e s s t r o b e a n d h a n d s h a k e p a r a l l e l i / o o s c i l l a t o r c l o c k l o g i c a / d c o n v e r t e r s c i s p i t i m e r s y s t e m b u s e x p a n s i o n a d d r e s s a d d r e s s / d a t a - i r q - x i r q - r e s e t c p u c o r e e x t a l e x t a l m o d a m o d b p o r t a p o r t e v r h v r l 8 f i g u r e 1 2 . b l o c k d i a g r a m o f t h e m c 6 8 h c 1 1 m i c r o c o n t r o l l e r s s * s c k m o s i m i s o t x d r x d t h e 6 8 h c 1 1 c a n b e c o n f i g u r e d t o o p e r a t e i n a ? s i n g l e c h i p ? m o d e o r i n a n ? e x p a n d e d m u l t i p l e x e d b u s ? m o d e . i f a d e v i c e i s c o n f i g u r e d t o o p e r a t e i n t h e ? s i n g l e c h i p ? m o d e , t h e e n t i r e 6 4 k b y t e s o f a d d r e s s s p a c e i s i n t e r n a l t o t h e  c i c . p l e a s e n o t e t h a t t h i s d o e s n o t m e a n t h a t t h e r e i s 6 4 k b y t e s o f m e m o r y , o r o t h e r a d d r e s s a b l e p o r t i o n s w i t h i n t h e d e v i c e . a 6 8 h c 1 1 m c u c o n f i g u r e d f o r ? s i n g l e c h i p ? m o d e o p e r a t i o n c a n n o t a d d r e s s a n y c o m p o n e n t s e x t e r n a l t o t h e m c u . t h e r e f o r e , i f a u s e r d e s i r e d t o i n t e r f a c e t h e d u a r t t o t h i s  c , t h e n t h e  c m u s t o p e r a t e i n t h e ? e x p a n d e d - m u l t i p l e x e d ? m o d e . t h e m c 6 8 h c 1 1 i s c o n f i g u r e d i n t o t h e e x p a n d e d m u l t i p l e x e d m o d e b y t y i n g b o t h t h e m o d a a n d m o d b p i n t o v c c , a n d t h e n r e s e t t i n g t h e d e v i c e . t h e m c 6 8 h c 1 1 c o n s i s t s o f 5 d i f f e r e n t m u l t i - f u n c t i o n p a r a l l e l p o r t s . e a c h o f t h e s e p o r t s a r e b r i e f l y d i s c u s s e d . p o r t a p o r t a c o n s i s t s o f 3 i n p u t p i n s , 4 o u t p u t p i n s a n d 1 b i - d i r e c t i o n a l p i n . t h i s p o r t i s u s e d t o s u p p o r t t h e t i m e r s y s t e m . o n e o f t h e i n p u t p i n s c a n b e u s e d f o r t h e p u l s e
x r 8 8 c 6 8 1 3 7 r e v . 2 . 1 1 a c c u m u l a t o r . t h r e e o f t h e i n p u t p i n s s u p p o r t i n p u t c a p t u r e f u n c t i o n s ; a n d f o u r o f t h e o u t p u t p i n s s u p p o r t o u t p u t c o m p a r e f u n c t i o n s . p o r t b p o r t b c o n s i s t s o f 8 o u t p u t p i n s . i f t h e 6 8 h c 1 1  c i s o p e r a t i n g i n t h e s i n g l e c h i p m o d e , t h i s p o r t f u n c t i o n s a s a g e n e r a l p u r p o s e o u t p u t p o r t . h o w e v e r , i f t h e 6 8 h c 1 1 i s o p e r a t i n g i n t h e e x p a n d e d - m u l t i p l e x e d m o d e , t h e n t h i s p o r t w i l l f u n c t i o n a s t h e u p p e r a d d r e s s b y t e f o r m e m o r y / p e r i p h e r a l d e v i c e i n t e r f a c i n g ( a 8 - a 1 5 ) . p o r t c p o r t c c o n s i s t s o f 8 b i - d i r e c t i o n a l p i n s . w h e n t h e 6 8 h c 1 1 i s o p e r a t i n g i n t h e s i n g l e - c h i p m o d e , t h i s p o r t f u n c t i o n s a s a g e n e r a l p u r p o s e b i - d i r e c t i o n a l p o r t . h o w e v e r , i f t h e 6 8 h c 1 1 i s o p e r a t i n g i n t h e e x p a n d e d - m u l t i p l e x e d m o d e t h e n t h i s p o r t w i l l f u n c t i o n a s t h e m u l t i p l e x e d a d d r e s s / d a t a b u s ( a d 0 - a d 7 ) . s p e c i f i c a l l y , d u r i n g t h e f i r s t h a l f o f a m e m o r y c y c l e , t h i s p o r t w i l l f u n c t i o n a s t h e l o w e r a d d r e s s b y t e ( p o r t b i s t h e u p p e r a d d r e s s b y t e ) f o r a d d r e s s i n g m e m o r y d e v i c e s a n d p e r i p h e r a l c o m p o n e n t s . d u r i n g t h e s e c o n d h a l f o f t h e m e m o r y c y c l e , t h i s p o r t w i l l f u n c t i o n a s t h e b i - d i r e c t i o n a l d a t a b u s . t h i s p o r t c a n b e d e m u l t i p l e x e d v i a t h e u s e o f t h e a s ( a d d r e s s s t r o b e ) p i n a n d a 7 4 l s 3 7 3 l a t c h d e v i c e . p o r t d p o r t d c o n s i s t s o f 8 b i - d i r e c t i o n a l p i n s . h o w e v e r , t h i s p o r t c a n b e c o n f i g u r e d t o s u p p o r t t h e o n - c h i p s e r i a l p e r i p h e r a l i n t e r f a c e ( s p i ) , a n d s e r i a l c o m m u n i c a t i o n s i n t e r f a c e ( s c i ) . p o r t e p o r t e c o n s i s t s o f e i t h e r 4 o r 8 i n p u t s ( d e p e n d i n g u p o n t h e p a c k a g i n g o p t i o n ) . t h i s p o r t c a n b e c o n f i g u r e d t o f u n c t i o n a s a g e n e r a l p u r p o s e i n p u t o r a s t h e i n p u t s t o t h e o n - c h i p a / d c o n v e r t e r . t h e r e a r e n u m e r o u s o t h e r p i n s t h a t a r e p e r t i n e n t f o r i n t e r f a c i n g t o t h e x r 8 8 c 6 8 1 d u a r t d e v i c e . s o m e o f t h e s e p i n s a r e d i s c u s s e d h e r e . i r q t h i s i s t h e ? m a s k a b l e ? i n t e r r u p t r e q u e s t i n p u t . i f t h i s i n p u t i s a s s e r t e d ( e . g . , t o g g l e d ? l o w ? ) , t h e n t h e 6 8 h c 1 1  c w i l l b r a n c h p r o g r a m c o n t r o l t o f f f 2 , f f f 3 i n s y s t e m m e m o r y ( o n - c h i p r o m ) . t h e u s e r i s r e s p o n s i b l e f o r i n s u r i n g t h a t t h e a p p r o p r i a t e i n t e r r u p t s e r v i c e r o u t i n e r e s i d e s a t t h i s l o c a t i o n i n m e m o r y . a s / s t r a a s o r ? a d d r e s s s t r o b e ? c a n b e u s e d t o d e m u l t i p l e x t h e a d d r e s s / d a t a b u s o f p o r t c . t h i s p i n i s a t a l o g i c ? h i g h ? d u r i n g t h e f i r s t h a l f o f a m e m o r y c y c l e ; a n d a t a l o g i c ? l o w ? d u r i n g t h e s e c o n d h a l f o f a m e m o r y c y c l e . i f t h e 6 8 h c 1 1 i s i n t e n d e d t o o p e r a t e i n t h e e x p a n d e d - m u l t i p l e x e d m o d e a n d i n t e r f a c e t o m o r e t h a n 2 5 6 b y t e s o f a d d r e s s a b l e m e m o r y s p a c e , t h e n b o t h p o r t s b a n d c a r e r e q u i r e d a s s h o w n i n f i g u r e 1 3 . f i g u r e 1 3 a l s o i l l u s t r a t e s h o w t h e x r 8 8 c 6 8 1 d u a r t c o u l d b e c o n n e c t e d t o t h e 6 8 h c 1 1  c f o r i n t e r r u p t d r i v e n o p e r a t i o n . i f t h e d u a r t r e q u e s t s a n i n t e r r u p t , i t s a c t i v e l o w - i n t r p i n w i l l b e a s s e r t e d ( t o g g l e l o w ) , w h i c h w i l l , i n t u r n , c a u s e t h e - i r q p i n o f t h e c p u t o b e a s s e r t e d . w h e n t h i s o c c u r s t h e  c w i l l c o n t i n u e e x e c u t i n g i t s c u r r e n t i n s t r u c t i o n . a f t e r c o m p l e t i o n o f t h i s i n s t r u c t i o n , p r o g r a m c o n t r o l w i l l s h i f t t o l o c a t i o n f f f 2 , f f f 3 i n s y s t e m m e m o r y . t h e u s e r i s r e s p o n s i b l e t o i n s u r e t h a t t h e d u a r t ? s i n t e r r u p t s e r v i c e r o u t i n e r e s i d e s a t t h i s l o c a t i o n i n m e m o r y . t h e  c w i l l n o t i s s u e a n i n t e r r u p t a c k n o w l e d g e s i g n a l t o t h e d u a r t . i n s t e a d , t h e  c w i l l j u s t p r o c e s s e s t h r o u g h t h e i n t e r r u p t s e r v i c e r o u t i n e . o n c e t h e  c h a s e l i m i n a t e d t h e c a u s e ( s ) o f t h e d u a r t ? s i n t e r r u p t r e q u e s t , t h e - i n t r p i n w i l l b e n e g a t e d a n d t h e  c w i l l r e t u r n f r o m t h e i n t e r r u p t s e r v i c e r o u t i n e a n d r e s u m e n o r m a l p r o c e s s i n g . o n e m o r e p o i n t s h o u l d b e m e n t i o n e d a b o u t f i g u r e 1 3 . t h e g l u e - l o g i c c i r c u i t r y r e q u i r e d t o g e n e r a t e t h e - w r , - r d , a n d t h e r e s e t s i g n a l s f o r t h e d u a r t , f r o m t h e - r / w , - r e s e t , a n d e c l o c k p r e s e n t e d i n f i g u r e 2 . t h i s c i r c u i t r y h a s a l s o b e e n i n c l u d e d i n f i g u r e 1 4 .
x r 8 8 c 6 8 1 3 8 r e v . 2 . 1 1 6 8 h c 1 1 x r 8 8 c 6 8 1 7 4 h c 3 7 3 e - r / w a 8 - a 1 5 - w r - r d - c s - i n t r - i r q a 0 - a 3 a s a d 0 - a d 7 a 0 - a 3 a 4 - a 7 d 0 - d 7 a d d r e s s d e c o d e r g m o d a m o d b 5 v t o o t h e r i c s d q f i g u r e 1 3 . x r 8 8 c 6 8 1 / m c 6 8 h c 1 1 m i c r o c o n t r o l l e r i n t e r f a c i n g a p p r o a c h
x r 8 8 c 6 8 1 3 9 r e v . 2 . 1 1 - r / w - w r e c l o c k - r d - r e s e t r e s e t f i g u r e 1 4 . g l u e l o g i c c i r c u i t r y r e q u i r e d t o i n t e r f a c e t h e m c 6 8 h c 1 1  c t o t h e x r 8 8 c 6 8 1 d u a r t c . 6 . 1 . 5 z - 8 0 c p u t h e z - 8 0 c p u c a n b e i n t e r f a c e d t o a d u a r t o p e r a t i n g i n t h e i - m o d e , i f i t ( t h e c p u ) i s o p e r a t i n g i n i n t e r r u p t m o d e s 0 o r 1 . h o w e v e r , f o r t h e s a k e o f ? p r o c e s s o r c o n t i n u i t y ? , t h e d e t a i l s a s s o c i a t e d w i t h t h e z - 8 0 c p u w i l l b e p r e s e n t e d i n s e c t i o n c . 6 . 2 . 1 . c . 6 . 2 z - m o d e i n t e r r u p t s e r v i c i n g t h e d u a r t w i l l b e i n t h e i - m o d e f o l l o w i n g p o w e r u p o r a h a r d w a r e r e s e t o f t h e i c . t h e u s e r m u s t i n v o k e t h e ? s e t z - m o d e ? c o m m a n d ( s e e t a b l e 3 ) , i n o r d e r t o c o m m a n d t h e d u a r t i n t o t h e z - m o d e . i n g e n e r a l , a c p u i n t e r f a c i n g t o a d u a r t o p e r a t i n g i n t h e z - m o d e w i l l f u n c t i o n a s f o l l o w s d u r i n g i n t e r r u p t s e r v i c i n g . i f t h e d u a r t r e q u e s t s i n t e r r u p t s e r v i c i n g f r o m t h e c p u , i t w i l l a s s e r t t h e - i n t r p i n ( e . g . , t o g g l e ? l o w ? ) . o n c e t h e c p u h a s d e t e c t e d t h e i n t e r r u p t r e q u e s t , i t w i l l i s s u e a n i a c k ( i n t e r r u p t a c k n o w l e d g e ) s i g n a l b a c k t o t h e d u a r t . w h e n t h e c p u s e n d s t h e i a c k s i g n a l t o t h e d u a r t i t i s i n f o r m i n g t h e d u a r t t h a t i t s i n t e r r u p t r e q u e s t i s a b o u t t o b e s e r v e d . w h e n t h e d u a r t h a s r e c e i v e d ( o r d e t e c t e d ) t h e i a c k s i g n a l , i t w i l l , i n r e s p o n s e , p l a c e t h e c o n t e n t s o f t h e i n t e r r u p t v e c t o r r e g i s t e r ( i v r ) o n t h e d a t a b u s . t h e c p u w i l l r e a d t h i s ? i n t e r r u p t v e c t o r ? i n f o r m a t i o n ; a n d d e t e r m i n e t h e f o l l o w i n g t w o t h i n g s ( b a s e d o n t h e ? i n t e r r u p t v e c t o r ? i n f o r m a t i o n ) . d t h e s o u r c e o f t h e i n t e r r u p t r e q u e s t ( e . g . , w h i c h p e - r i p h e r a l n e e d s s e r v i c e ) . d t h e a p p r o p r i a t e l o c a t i o n o f t h e i n t e r r u p t s e r v i c e r o u - t i n e . a f t e r w a r d s , p r o g r a m - c o n t r o l w i l l b e b r a n c h e d t o t h e l o c a t i o n o f t h e i n t e r r u p t s e r v i c e r o u t i n e . a n o t h e r c h a r a c t e r i s t i c o f z - m o d e o p e r a t i o n i s t h a t i t a l l o w s t h e u s e r t o p r i o r i t i z e t h e i n t e r r u p t r e q u e s t s f r o m n u m e r o u s p e r i p h e r a l d e v i c e s , v i a h a r d w a r e m e a n s . l e t u s s u p p o s e t h a t w e h a v e s e v e r a l d u a r t d e v i c e s ; a n d t h a t e a c h o f t h e s e d e v i c e s h a v e b e e n c o n f i g u r e d t o o p e r a t e i n t h e z - m o d e . t h e u s e r c o u l d p r i o r i t i z e t h e i n t e r r u p t r e q u e s t o f e a c h o f t h e s e d e v i c e s b y c o n n e c t i n g t h e s e d e v i c e s i n a ? d a i s y - c h a i n ? i n a m a n n e r a s p r e s e n t e d i n f i g u r e 1 5 .
x r 8 8 c 6 8 1 4 0 r e v . 2 . 1 1 c p u - i n t - i a c k - i n t r i e i i e o - i a c k - i n t r i e i i e o - i a c k - i n t r i e i i e o - i a c k - i n t r i e i i e o - i a c k v c c h i g h e s t l o w e s t p r i o r i t y f i g u r e 1 5 . a d i a g r a m o f n u m e r o u s d u a r t s c o n f i g u r e d i n a n i n t e r r u p t d a i s y c h a i n ( f o r z - m o d e o p e r a t i o n ) v c c i n a d d i t i o n t o t h e - i n t r a n d - i a c k p i n s , t h e z - m o d e d u a r t a l s o u s e s t h e i e i a n d i e o p i n s ; w h i c h a r e d e f i n e d a s f o l l o w s : i e i - i n t e r r u p t e n a b l e i n p u t t h i s a c t i v e - h i g h i n p u t i s o n l y a v a i l a b l e i f t h e d u a r t i s c o n f i g u r e d t o o p e r a t e i n t h e z - m o d e . i f t h i s i n p u t i s a t a l o g i c ? h i g h ? t h e n a l l u n m a s k e d i n t e r r u p t r e q u e s t s , f r o m t h i s d u a r t , a r e e n a b l e d . n o t e : t h o s e i n t e r r u p t s w h i c h h a v e b e e n m a s k e d o u t b y t h e i m r a r e s t i l l d i s a b l e d . h o w e v e r , i f t h i s i n p u t i s a t a l o g i c ? l o w ? , t h e n a l l i n t e r r u p t s ( w h e t h e r m a s k e d o r u n m a s k e d ) a r e d i s a b l e d . h e n c e , i e i c a n a c t t o g l o b a l l y d i s a b l e a l l d u a r t i n t e r r u p t r e q u e s t s . i e o - i n t e r r u p t e n a b l e o u t p u t t h i s a c t i v e - h i g h o u t p u t i s o n l y a v a i l a b l e i f t h e d u a r t i s c o n f i g u r e d t o o p e r a t e i n t h e z - m o d e . t h i s o u t p u t i s o f t e n t i m e s c o n n e c t e d t o t h e i e i i n p u t o f a n o t h e r ( l o w e r p r i o r i t y ) d e v i c e . t h i s o u t p u t i s ? h i g h ? i f a l l o f t h e f o l l o w i n g c o n d i t i o n s a r e t r u e . d t h e d e v i c e ? s i e i i n p u t i s a t a l o g i c ? h i g h ? d t h e d e v i c e i s n o t r e q u e s t i n g a n i n t e r r u p t f r o m t h e c p u d a n i n t e r r u p t , r e q u e s t e d b y t h e d e v i c e , h a s j u s t b e e n s e r v i c e d i f a n y o f t h e s e c o n d i t i o n s a r e f a l s e , t h e n t h e i e o p i n w i l l b e a t a l o g i c ? l o w ? . n o t e : o n c e t h e i e o p i n h a s t o g g l e d ? l o w ? , a n d t h e c p u h a s a c - k n o w l e d g e d t h e i n t e r r u p t r e q u e s t a n d h a s c o m p l e t e d t h e i n t e r - r u p t s e r v i c e r o u t i n e , t h e i e o p i n w i l l r e m a i n ? l o w ? u n t i l t h e u s e r i n v o k e s t h e ? r e s e t i u s ? c o m m a n d ( s e e t a b l e 3 ) . t h e r e f o r e , i f t h e d u a r t i s g o i n g t o o p e r a t e i n t h e z - m o d e , t h e u s e r m u s t i n c l u d e t h e ? r e s e t i u s ? c o m m a n d a t t h e v e r y e n d o f t h e d u a r t i n t e r r u p t s e r v i c e r o u t i n e . s y s t e m l e v e l a p p l i c a t i o n o f t h e i e i a n d i e o p i n s f i g u r e 1 5 d e p i c t s a s e r i e s o f d u a r t s c o n n e c t e d i n a d a i s y - c h a i n f a s h i o n . i n t h i s f i g u r e , t h e l e f t - m o s t d u a r t h a s t h e h i g h e s t i n t e r r u p t p r i o r i t y . t h i s i s b e c a u s e t h i s d u a r t ? s i e i i n p u t i s h a r d w i r e d t o v c c . t h e r e f o r e , t h e u n m a s k e d i n t e r r u p t r e q u e s t s , f r o m t h i s d u a r t a r e a l w a y s e n a b l e d . t h e d u a r t d e v i c e , l o c a t e d j u s t t o t h e r i g h t o f t h e ? h i g h e s t i n t e r r u p t p r i o r i t y ? d e v i c e i s o f a l o w e r i n t e r r u p t p r i o r i t y . t h i s i s b e c a u s e t h e i e i i n p u t o f t h i s l o w e r p r i o r i t y d e v i c e i s c o n n e c t e d t o t h e i e o o u t p u t o f t h e h i g h e s t p r i o r i t y d u a r t . w h e n e v e r t h e ? h i g h e s t p r i o r i t y ? d e v i c e r e q u e s t s a n i n t e r r u p t , i t s i e o o u t p u t w i l l t o g g l e ? l o w ? . t h i s w i l l i n t u r n , d i s a b l e t h e ? l o w e r p r i o r i t y ? d e v i c e
x r 8 8 c 6 8 1 4 1 r e v . 2 . 1 1 f r o m i s s u i n g a n y i n t e r r u p t r e q u e s t s t o t h e c p u . t h i s ? l o w e r p r i o r i t y ? d u a r t w i l l b e p r o h i b i t e d f r o m i s s u i n g i n t e r r u p t s u n t i l t h e i e o p i n o f t h e ? h i g h e s t p r i o r i t y ? d u a r t h a s t o g g l e d ? h i g h ? . r e f e r r i n g , o n c e a g a i n , t o f i g u r e 1 5 , t h e f u r t h e r t o t h e r i g h t a d u a r t d e v i c e i s , t h e l o w e r i t s i n t e r r u p t p r i o r i t y . t h e r i g h t m o s t d u a r t h a s t h e l o w e s t - i n t e r r u p t p r i o r i t y b e c a u s e i t s ? i n t e r r u p t r e q u e s t ? c a p a b i l i t y c a n b e d i s a b l e d b y t h e a c t i o n s o f a n y o n e o f t h e d u a r t s t o t h e l e f t . f i g u r e 1 6 p r e s e n t s a t i m i n g d i a g r a m d e p i c t i n g t h e s e q u e n c e o f e v e n t s t h a t w i l l o c c u r d u r i n g a n d f o l l o w i n g a n i n t e r r u p t r e q u e s t f r o m t h e d u a r t . - i n t r - i a c k - r d d 0 - d 7 f l o a t n o t v a l i d v e c t o r f l o a t i e i i e o r e s e t i u s c o m m a n d f i g u r e 1 6 . t i m i n g d i a g r a m i l l u s t r a t i n g t h e s e q u e n c e o f e v e n t s o c c u r r i n g b e t w e e n t h e d u a r t a n d t h e c p u d u r i n g a n i n t e r r u p t r e q u e s t / a c k n o w l e d g e a n d s e r v i c i n g a d d i t i o n a l t h i n g s t o n o t e a b o u t z - m o d e o p e r a t i o n z - m o d e o p e r a t i o n i s s u p p o r t e d b y a l l z i l o g p e r i p h e r a l c o m p o n e n t s . a l l z i l o g p e r i p h e r a l c o m p o n e n t s h a v e a n i n t e r r u p t v e c t o r r e g i s t e r , i n t e r r u p t a c k n o w l e d g e ( i a c k ) i n p u t , i e i i n p u t , a n d a n i e o o u t p u t . t h e r e f o r e , f i g u r e 1 5 c o u l d h a v e e a s i l y i n c l u d e d s o m e o t h e r p e r i p h e r a l c o m p o n e n t s , i n a d d i t i o n t o o r i n l i e u o f d u a r t s . a s m e n t i o n e d e a r l i e r , z - m o d e o p e r a t i o n i s r e c o m m e n d e d i f t h e d u a r t i s t o b e i n t e r f a c e d t o t h e f o l l o w i n g p r o c e s s o r s . d z - 8 0 m i c r o p r o c e s s o r ( i n t e r r u p t m o d e 2 ) d 8 0 8 8  c d 8 0 8 6  p d 8 0 2 8 6 - 8 0 5 8 6  p p l e a s e n o t e t h a t i t i s p o s s i b l e t o i n t e r f a c e t h e 8 0 x 8 6 f a m i l y o f m i c r o p r o c e s s o r s t o a n i - m o d e d u a r t , h o w e v e r , a d d i t i o n a l c o m p o n e n t s a n d d e s i g n c o m p l e x i t y w o u l d b e r e q u i r e d i n o r d e r t o a c c o m p l i s h t h i s . t h e t e c h n i q u e / a p p r o a c h e s t o i n t e r f a c i n g t h e z - m o d e d u a r t t o t h e s e m i c r o p r o c e s s o r s i s p r e s e n t e d i n d e t a i l , i n t h e f o l l o w i n g s e c t i o n s . c . 6 . 2 . 1 z - 8 0 m i c r o p r o c e s s o r t h e z - 8 0  p c o n s i s t s o f a n 8 b i t d a t a b u s , a 1 6 b i t a d d r e s s b u s a n d n u m e r o u s c o n t r o l p i n s . t h e z - 8 0  p i s a v e r y f l e x i b l e p r o c e s s o r w h i c h c a n a c t u a l l y i n t e r f a c e t o e i t h e r a z - m o d e o r a n i - m o d e d u a r t d e v i c e . t h i s i s b e c a u s e t h e
x r 8 8 c 6 8 1 4 2 r e v . 2 . 1 1 z - 8 0  p c a n b e c o n f i g u r e d t o o p e r a t e i n o n e o f t h r e e d i f f e r e n t ? i n t e r r u p t m o d e s ? . t h e z - 8 0 i s a l s o a l i t t l e b i t l e s s c o m p l i c a t e d t o i n t e r f a c e t o ( t h a n s o m e o f t h e  p /  c s p r e v i o u s l y m e n t i o n e d ) b e c a u s e i t s a d d r e s s a n d d a t a b u s a r e n o t m u l t i p l e x e d . f i g u r e 1 7 p r e s e n t s a s c h e m a t i c o f t h e p i n o u t o f t h e z - 8 0  p . 1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 0 2 1 2 2 2 3 2 4 2 5 2 6 2 7 2 8 2 9 3 0 3 1 3 2 3 3 3 4 3 5 3 6 3 7 3 8 3 9 4 0 a 1 1 a 1 2 a 1 3 a 1 4 a 1 5 p h i d 4 d 3 d 5 d 6 v c c d 2 d 7 d 0 d 1 - i n t - n m i - h a l t - m r e q - i o r q - r d - w r - b u s a k - w a i t - b u s r q - r e s e t - m 1 - r f s h g n d a 0 a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 a 1 0 z 8 0 c p u f i g u r e 1 7 . p i n o u t o f t h e z 8 0 c p u d e v i c e t h e z - 8 0 c p u w i l l s u p p o r t r e a d / w r i t e o p e r a t i o n s b e t w e e n m e m o r y a n d i / o . t h e z - 8 0 d o e s r e q u i r e s o m e a d d i t i o n a l g l u e l o g i c i n o r d e r t o i n t e r f a c e d i r e c t l y t o m e m o r y a n d p e r i p h e r a l d e v i c e s . f o r i n s t a n c e , t h e z - 8 0 c p u d e v i c e d o e s n o t c o m e w i t h t h e c o n t r o l b u s s i g n a l s : - m e m r ( m e m o r y r e a d ) , - m e m w ( m e m o r y w r i t e ) , - i o r ( i / o p o r t r e a d ) , - i o w ( i / o p o r t w r i t e ) o r - i a c k / - i n t a ( i n t e r r u p t a c k n o w l e d g e ) p i n s . e a c h o f t h e s e f u n c t i o n s c a n b e d e r i v e d f r o m t h e - r d , - w r , - i o r q , - m r e q a n d - m 1 p i n s . f i g u r e 1 8 p r e s e n t s a s c h e m a t i c o f t h e z - 8 0 c p u m o d u l e , w h i c h s h o w s h o w o n c e c a n e x t r a c t t h e c o n t r o l b u s s i g n a l s f r o m t h e s e c p u c o n t r o l p i n s .
x r 8 8 c 6 8 1 4 3 r e v . 2 . 1 1 a 0 - a 1 5 d 0 - d 7 - i n t - n m i - w a i t - b u s r q - h a l t - r f s h - b u s a k - w r - r d - m r e q - i o r q - m 1 - r e s e t - i n t a - i o r - i o w - m e m r - m e m w g n d + 5 v p h i c l o c k i n p u t f i g u r e 1 8 . s c h e m a t i c o f z - 8 0 c p u m o d u l e z - 8 0 c p u i n t e r r u p t s e r v i c i n g c a p a b i l i t y t h e z - 8 0 c p u c o n t a i n s t w o i n t e r r u p t r e q u e s t p i n s : - n m i a n d - i n t . - n m i i s t h e ? n o n - m a s k a b l e ? i n t e r r u p t r e q u e s t i n p u t p i n ; a n d - i n t i s t h e ? m a s k a b l e ? i n t e r r u p t r e q u e s t i n p u t p i n . f o r t h e s a k e o f i n t e r f a c i n g t o t h e d u a r t , w e a r e o n l y c o n c e r n e d w i t h t h e - i n t p i n . t h e z - 8 0 c p u c a n b e c o n f i g u r e d t o o p e r a t e i n o n e o f t h r e e d i f f e r e n t i n t e r r u p t m o d e s : d e x t e r n a l v e c t o r e d d d i r e c t d ? p e r i p h e r a l ? v e c t o r e d e a c h o f t h e s e i n t e r r u p t m o d e s u s e t h e - i n t p i n o f t h e z - 8 0 c p u a n d w i l l b e d i s c u s s e d i n t h e f o l l o w i n g s e c t i o n s . e x t e r n a l v e c t o r e d i n t e r r u p t p r o c e s s i n g ( i n t e r r u p t m o d e 0 ) t h e z - 8 0  p w i l l o p e r a t e i n t h i s i n t e r r u p t m o d e i f t h e ? i m 0 ? i n s t r u c t i o n h a s b e e n e x e c u t e d . w h e n e v e r t h e - i n t p i n i s a s s e r t e d b y a p e r i p h e r a l d e v i c e r e q u e s t i n g a n i n t e r r u p t , t h e c p u w i l l c o m p l e t e i t s c u r r e n t i n s t r u c t i o n . a f t e r c o m p l e t i o n o f t h i s i n s t r u c t i o n , t h e c p u m o d u l e w i l l a s s e r t - i n t a ( t o g g l e ? l o w ? ) . - i n t a i s t h e a c t i v e - l o w ? i n t e r r u p t a c k n o w l e d g e ? s i g n a l t h a t t h e c p u m o d u l e o u t p u t s i n o r d e r t o i n i t i a t e t h e p r o c e s s o f i n t e r r u p t s e r v i c i n g . w h e n t h e z - 8 0 c p u o p e r a t e s i n t h e i n t e r r u p t m o d e 0 , i t i s
x r 8 8 c 6 8 1 4 4 r e v . 2 . 1 1 a w a i t i n g ? v e c t o r i n f o r m a t i o n ? o n t h e d a t a b u s , f o l l o w i n g t h e a s s e r t i o n o f - i n t a . i n t h i s c a s e ( f o r t h i s i n t e r r u p t m o d e ) , t h i s ? v e c t o r ? i n f o r m a t i o n i s t h e o p - c o d e f o r o n e o f t h e r e s t a r t i n s t r u c t i o n s ( r s t ) . t h e z - 8 0 c p u s u p p o r t s u p t o e i g h t d i f f e r e n t r s t i n s t r u c t i o n s ( r s t 0 - r s t 3 8 h ) . t h e s e i n s t r u c t i o n s a r e o n e - b y t e c a l l s t o s p e c i f i c l o c a t i o n s w i t h i n t h e c p u ? s m e m o r y s p a c e , w h e r e t h e a p p r o p r i a t e i n t e r r u p t s e r v i c e r o u t i n e r e s i d e s . t a b l e 1 2 p r e s e n t s a l i s t o f t h e s e r e s t a r t i n s t r u c t i o n s , t h e o p - c o d e s a n d t h e c o r r e s p o n d i n g r e s t a r t a d d r e s s e s . o p - c o d e ( h e x ) m n e m o n i c r e s t a r t a d d r e s s ( h e x ) c 7 r s t 0 0 0 0 0 c f r s t 0 8 0 0 0 8 d 7 r s t 1 0 0 0 1 0 d f r s t 1 8 0 0 1 8 e 7 r s t 2 0 h 0 0 2 0 e f r s t 2 8 h 0 0 2 8 f 7 r s t 3 0 h 0 0 3 0 f f r s t 3 8 h 0 0 3 8 t a b l e 1 2 . z - 8 0 c p u r e s t a r t i n s t r u c t i o n s u s e d w i t h v e c t o r e d i n t e r r u p t s t h e r e f o r e , o n c e t h e c p u r e c e i v e s t h e o p - c o d e f o r o n e o f t h e s e r e s t a r t i n s t r u c t i o n s , i t w i l l b e g i n e x e c u t i n g t h i s i n s t r u c t i o n b y l o a d i n g t h e p r o g r a m c o u n t e r w i t h t h e a p p r o p r i a t e ? r e s t a r t ? a d d r e s s . a f t e r w a r d s , p r o g r a m c o n t r o l w i l l b e b r a n c h e d t o t h e ? r e s t a r t a d d r e s s ? l o c a t i o n . f o r e x a m p l e : i f t h e o p - c o d e e 7 1 6 i s l o a d e d o n t o t h e d a t a b u s d u r i n g t h e - i n t a c y c l e , t h i s o p - c o d e c o r r e s p o n d s w i t h t h e r s t 2 0 h i n s t r u c t i o n a n d , t h e c p u w i l l l o a d 0 0 2 0 1 6 i n t o t h e p r o g r a m c o u n t e r a n d p r o g r a m c o n t r o l w i t h b r a n c h t o t h a t l o c a t i o n i n m e m o r y ( s e e t a b l e 1 2 ) . t h e u s e r i s r e s p o n s i b l e f o r i n s u r i n g t h a t t h e i n t e r r u p t s e r v i c e r o u t i n e b e g i n s a t t h i s l o c a t i o n i n m e m o r y . a n e x a m p l e o f a c i r c u i t r e a l i z i n g t h i s f o r m o f i n t e r r u p t p r o c e s s i n g , w h i l e i n t e r f a c i n g t o t h e d u a r t , i s p r e s e n t e d i n s e c t i o n c . 6 . 1 . 2 . t h i s s e c t i o n d i s c u s s e s i n t e r f a c i n g t h e d u a r t t o t h e 8 0 8 0 a c p u m o d u l e . t h i s e x a c t s a m e a p p r o a c h c o u l d b e u s e d w i t h t h e z - 8 0 c p u , p r o v i d e t h a t t h e d u a r t i s o p e r a t i n g i n t h e i - m o d e a n d t h a t t h e z - 8 0 i s o p e r a t i n g i n i n t e r r u p t m o d e 0 . d i r e c t i n t e r r u p t p r o c e s s i n g ( i n t e r r u p t m o d e 1 ) t h e z - 8 0  p w i l l o p e r a t e i n t h i s i n t e r r u p t m o d e i f t h e ? i m 1 ? i n s t r u c t i o n h a s b e e n e x e c u t e d . w h e n e v e r t h e - i n t p i n i s a s s e r t e d b y a p e r i p h e r a l d e v i c e r e q u e s t i n g a n i n t e r r u p t , t h e c p u w i l l c o m p l e t e i t s c u r r e n t i n s t r u c t i o n . a f t e r w a r d s , t h e p r o g r a m c o u n t e r w i l l a u t o m a t i c a l l y b e l o a d e d w i t h a m e m o r y l o c a t i o n ( p r e - d e t e r m i n e d b y t h e c i r c u i t d e s i g n o f t h e z - 8 0 c p u d e v i c e ) a n d p r o g r a m c o n t r o l w i l l b e b r a n c h e d t o t h a t l o c a t i o n i n s y s t e m m e m o r y . i n t h i s c a s e , p r o g r a m c o n t r o l w o u l d b r a n c h t o 0 0 3 8 1 6 i n m e m o r y . t h e u s e r i s r e s p o n s i b l e f o r i n s u r i n g t h a t t h e a p p r o p r i a t e i n t e r r u p t s e r v i c e r o u t i n e i s a t t h a t p a r t i c u l a r l o c a t i o n i n m e m o r y . t h e z - 8 0 c p u m o d u l e d o e s n o t p r o v i d e t h e p e r i p h e r a l d e v i c e w i t h a n y s o r t o f ? i n t e r r u p t a c k n o w l e d g e ? . t h e c p u j u s t p r o c e s s e s t h r o u g h t h e i n t e r r u p t s e r v i c e r o u t i n e , e l i m i n a t e s t h e c a u s e ( s ) o f t h e i n t e r r u p t r e q u e s t a n d r e t u r n s t o n o r m a l o p e r a t i o n . p e r i p h e r a l v e c t o r e d i n t e r r u p t p r o c e s s i n g ( i n t e r r u p t m o d e 2 ) t h e z - 8 0  p w i l l o p e r a t e i n t h i s i n t e r r u p t m o d e i f t h e ? i m 2 ? i n s t r u c t i o n h a s b e e n e x e c u t e d . t h i s i n t e r r u p t ? m o d e ? i s v e r y u s e f u l i f t h e u s e r w i s h e s t o c o n n e c t t h e i n t e r r u p t r e q u e s t o u t p u t s o f s e v e r a l p e r i p h e r a l s t o t h e o n e - i n t i n p u t o f t h e z - 8 0 c p u . t h i s i n t e r r u p t m o d e a l l o w s t h e i n t e r r u p t i n g d e v i c e t o i d e n t i f y i t s e l f a t a c e r t a i n t i m e , j u s t p r i o r t o i n t e r r u p t s e r v i c i n g . w h e n e v e r t h e - i n t p i n i s a s s e r t e d b y a p e r i p h e r a l d e v i c e r e q u e s t i n g a n i n t e r r u p t , t h e c p u w i l l c o n t i n u e t o c o m p l e t e i t s c u r r e n t i n s t r u c t i o n . o n c e t h i s c u r r e n t i n s t r u c t i o n i s c o m p l e t e d , t h e c p u m o d u l e w i l l a s s e r t t h e - i n t a s i g n a l t o i n f o r m t h e p e r i p h e r a l d e v i c e t h a t i n t e r r u p t s e r v i c e i s a b o u t t o b e g i n . o n c e t h e i n t e r r u p t i n g p e r i p h e r a l d e v i c e h a s d e t e c t e d t h e - i n t a p u l s e , i t w i l l p l a c e a n ? i n t e r r u p t v e c t o r ? o n t h e d a t a b u s . t h i s i n t e r r u p t v e c t o r w i l l b e r e a d b y t h e c p u a n d t h e c p u w i l l b r a n c h p r o g r a m c o n t r o l t o t h e l o c a t i o n ( r e f e r r e d t o b y t h e i n t e r r u p t v e c t o r ) . p l e a s e n o t e t h a t i f t h e i e i i n p u t t o t h e d u a r t ( o r z i l o g p e r i p h e r a l d e v i c e ) i s ? l o w ? t h e n t h e d u a r t ( o r z i l o g p e r i p h e r a l d e v i c e ) w i l l b e d i s a b l e d f r o m g e n e r a t i n g a n y i n t e r r u p t r e q u e s t s t o t h e c p u . a n e x a m p l e o f t h i s a p p r o a c h i s p r e s e n t e d f i g u r e 1 9 . i n t h i s c a s e t h e x r 8 8 c 6 8 1 d u a r t i s c o n f i g u r e d t o o p e r a t e i n t h e z - m o d e a n d i s i n t e r f a c e d t o t h e z - 8 0 c p u . w h e n t h e d u a r t r e q u i r e s i n t e r r u p t s e r v i c i n g , i t w i l l a s s e r t i t s
x r 8 8 c 6 8 1 4 5 r e v . 2 . 1 1 - i n t r o u t p u t . t h i s a c t i o n w i l l , i n t u r n , c a u s e t h e - i n t i n p u t o f t h e c p u t o b e a s s e r t e d . o n c e t h e c p u h a s c o m p l e t e d i t s c u r r e n t i n s t r u c t i o n , t h e c p u m o d u l e w i l l a s s e r t t h e - i n t a s i g n a l . t h i s w i l l i n t u r n a s s e r t t h e - i a c k ( i n t e r r u p t a c k n o w l e d g e ) i n p u t t o t h e d u a r t . t h e p u r p o s e o f t h e a s s e r t e d - i a c k s i g n a l i s t o i n f o r m t h e d u a r t t h a t t h e v e r y n e x t c y c l e w i l l b e a n ? i a c k ? o r ? i n t e r r u p t a c k n o w l e d g e ? c y c l e . d u a r t , i n r e s p o n s e t o t h e - i a c k s i g n a l , w i l l p l a c e t h e c o n t e n t s o f t h e i n t e r r u p t v e c t o r r e g i s t e r ( i v r ) o n t h e d a t a b u s . t h i s d a t a w i l l b e r e a d b y t h e c p u , a n d p r o g r a m c o n t r o l w i l l b e b r a n c h e d t o t h e a p p r o p r i a t e i n t e r r u p t s e r v i c e r o u t i n e . i n t h e c a s e o f t h e z - 8 0 c p u , t h i s l o c a t i o n i s a 1 6 b i t a d d r e s s w h i c h i s d e t e r m i n e d f r o m t a b l e 1 3 . m o s t s i g n i f i c a n t b y t e l e a s t s i g n i f i c a n t b y t e b i t 1 5 b i t 1 4 b i t 1 3 b i t 1 2 b i t 1 1 b i t 1 0 b i t 9 b i t 8 b i t 7 b i t 6 b i t 5 b i t 4 b i t 3 b i t 2 b i t 1 b i t 0 c o n t e n t s o f t h e i r e g i s t e r ( w i t h i n t h e c p u ) t h e 7 m o s t s i g n i f i c a n t b i t s w i t h i n t h e i n t e r r u p t v e c t o r r e g i s t e r o f t h e d u a r t 0 n o t e : t h e l s b o f t h e i v r i s a l w a y s s e t t o ? 0 ? o n c e r e a d b y t h e c p u . i n t e r r u p t s e r v i c e r o u t i n e s m u s t b e g i n a t e v e n d d r e s s e s . t a b l e 1 3 . t h e r e l a t i o n s h i p b e t w e e n t h e c o n t e n t s o f t h e i n t e r r u p t v e c t o r r e g i s t e r ( o f t h e d u a r t ) a n d t h e l o c a t i o n o f t h e i n t e r r u p t s e r v i c e r o u t i n e ( z - 8 0 c p u ) a d d i t i o n a l l y , t h e u s e r m u s t b e a w a r e o f t h e c o n t e n t s t h a t h e / s h e l o a d s i n t o t h e i r e g i s t e r o f t h e c p u , d u r i n g r u n t i m e . - i n t a t o l o w e r p r i o r i t y p e r i p h e r a l a d d r e s s d e c o d e r c i r c u i t r y a 0 - a 1 5 a 0 - a 3 a 0 - a 3 d 0 - d 7 d 0 - d 7 - c s c s _ d u a r t - i n t r - i n t - w r - r d - m r e q - i o r q m 1 - w r - r d - m e m w - i a c k z 8 0 c p u x r 8 8 c 6 8 1 - m e m r i e i i e o f r o m v c c o r h i g h e r p r i o r i t y p e r i p h e r a l f i g u r e 1 9 . s c h e m a t i c o f a n a p p r o a c h t o i n t e r f a c e t h e d u a r t t o t h e z - 8 0 c p u ( f o r z - m o d e o p e r a t i o n )
x r 8 8 c 6 8 1 4 6 r e v . 2 . 1 1 c . 6 . 2 . 2 8 0 8 6 m i c r o p r o c e s s o r t h e 8 0 8 6 m i c r o p r o c e s s o r i s a 1 6 b i t m i c r o p r o c e s s o r m a n u f a c t u r e d b y i n t e l c o r p o r a t i o n . f i g u r e 2 0 p r e s e n t s t h e p i n o u t d i a g r a m o f t h i s i c . p l e a s e n o t e t h a t i n f i g u r e 2 0 , p i n s 2 4 - 3 1 h a v e s o m e a d d i t i o n a l l a b e l s , l o c a t e d o f f t o t h e r i g h t o f t h e p a c k a g e . t h e s e a d d i t i o n a l l a b e l s w i l l b e e x p l a i n e d l a t e r i n t h i s t e x t . - r q / - g t 0 1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 0 2 1 2 2 2 3 2 4 2 5 2 6 2 7 2 8 2 9 3 0 3 1 3 2 3 3 3 4 3 5 3 6 3 7 3 8 3 9 4 0 g n d a d 1 4 a d 1 3 a d 1 2 a d 1 1 a d 1 0 a d 9 a d 8 a d 7 a d 6 a d 5 a d 4 a d 3 a d 2 a d 1 a d 0 n m i i n t r c l k g n d r e s e t r e a d y - t e s t q s 1 q s 0 - s 0 - s 1 - s 2 - l o c k - r q / - g t 1 - r d m n / m x - b h e / s 7 a 1 9 / s 6 a 1 8 / s 5 a 1 7 / s 4 a 1 6 / s 3 a d 1 5 v c c 8 0 8 6 c p u f i g u r e 2 0 . p i n o u t o f t h e 8 0 8 6 m i c r o p r o c e s s o r d e v i c e ( d t / - r ) ( - d e n ) ( a l e ) ( - i n t a ) ( h o l d ) ( h l d a ) ( - w r ) ( m / - i o ) i n t e l w e n t t o g r e a t l e n g t h s t o k e e p t h e p i n c o u n t o f t h i s i c l o w b y m u l t i p l e x i n g t h e f u n c t i o n s o f m a n y o f t h e s e p i n s . t h i s d e v i c e c o n s i s t s o f a 1 6 b i t d a t a b u s a n d a 2 0 b i t a d d r e s s b u s . t h e d a t a b u s i s m u l t i p l e x e d w i t h t h e l o w e r 1 6 a d d r e s s b i t s ( a 0 - a 1 5 ) t o f o r m a d 0 - a d 1 5 . a d d r e s s b i t s a 1 6 - a 1 9 a r e m u l t i p l e x e d w i t h s t a t u s b i t s s 3 - s 6 t o f o r m a 1 6 / s 3 , a 1 7 / s 4 , a 1 8 / s 5 a n d a 1 9 / s 6 . a l l o f t h e s e p i n s a r e a d d r e s s l i n e s d u r i n g t h e f i r s t h a l f o f a m e m o r y c y c l e . h o w e v e r , d u r i n g t h e s e c o n d h a l f o f a m e m o r y c y c l e , t h e s e p i n s t h e n t a k e o n t h e i r a l t e r n a t e f u n c t i o n s
x r 8 8 c 6 8 1 4 7 r e v . 2 . 1 1 ( e . g . , a d 0 - a d 1 5 b e c o m e s d 0 - d 1 5 , a 1 6 / s 3 - a 1 9 / s 6 b e c o m e s s 3 - s 6 ) . a s e c o n d g r o u p o f m u l t i p l e x e d p i n s i s c o n t r o l l e d b y t h e m n / - m x i n p u t p i n . w h e n t h i s p i n i s h i g h , t h e ? m i n ? m o d e i s s e l e c t e d a n d p i n s 2 4 t h r o u g h 3 1 t a k e o n t h e c o n t r o l d e f i n i t i o n s s h o w n u n d e r t h e m n / - m x = 1 c o l u m n i n t a b l e 1 4 . w h e n t h e 8 0 8 6  p o p e r a t e s i n t h i s m o d e , i t p r e s e n t s a c o n t r o l b u s v e r y s i m i l a r t o t h a t o f t h e 8 0 8 5  p , a n d r e q u i r e s o n l y a n a d d r e s s l a t c h a n d a c l o c k g e n e r a t o r t o f o r m a c p u m o d u l e . p i n n u m b e r m n / - m x = 1 ( m i n m o d e ) m n / - m x = 0 ( m a x m o d e ) 2 4 h o l d - r q / - g t 0 2 5 h l d a - r q / - g t 1 2 6 - w r - l o c k 2 7 m / - i o - s 2 2 8 d t / r - s 1 2 9 - d e n - s 0 3 0 a l e q s 0 3 1 - i n t a q s 1 t a b l e 1 4 . m n / - m x m o d e a n d f u n c t i o n o f p i n s 2 4 - 3 1 o f 8 0 8 6 c p u d e v i c e . w h e n m n / - m x i s l o w , t h e 8 0 8 6  p i s o p e r a t i n g i n t h e ? m a x ? m o d e . t h i s m o d e i s i n t e n d e d f o r m o r e c o m p l e x a p p l i c a t i o n s i n w h i c h t h e 8 0 8 6  p r e q u i r e s s u p p o r t f r o m t h e 8 0 8 7 n u m e r i c d a t a p r o c e s s o r ( n d p ) . i n t h i s m o d e , a s p e c i a l b u s c o n t r o l l e r ( t h e 8 2 8 8 ) i s r e q u i r e d t o g e n e r a t e t h e m e m o r y a n d i / o c o n t r o l b u s s i g n a l s . t h e 8 0 8 6  p c o n t a i n s t w o i n t e r r u p t r e q u e s t i n p u t s : i n t r a n d n m i . n m i i s t h e a c t i v e - h i g h ? n o n - m a s k a b l e ? i n t e r r u p t r e q u e s t i n p u t ; a n d i n t r i s t h e ? m a s k a b l e ? i n t e r r u p t r e q u e s t i n p u t . i f t h e 8 0 8 6  p i s o p e r a t i n g i n t h e ? m i n ? m o d e , t h e n t h e - i n t a ( i n t e r r u p t a c k n o w l e d g e ) p i n i s a v a i l a b l e o n p i n 2 4 ( s e e f i g u r e 2 0 ) . h o w e v e r , i f t h e 8 0 8 6  p i s o p e r a t i n g i n t h e ? m a x ? m o d e , t h e n t h e - i n t a s i g n a l m u s t b e d e r i v e d f r o m t h e - s 0 , - s 1 , a n d - s 2 p i n s v i a t h e 8 2 8 8 b u s c o n t r o l l e r . t a b l e 1 5 p r e s e n t s t h e p r o c e s s o r s t a t u s a n d 8 2 8 8 a c t i v e o u t p u t s b a s e d o n t h e - s 0 , - s 1 , a n d - s 2 ? m a x ? m o d e s t a t u s s i g n a l s . - s 2 - s 1 - s 0 p r o c e s s o r s t a t e 8 2 8 8 a c t i v e o u t p u t 0 0 0 i n t e r r u p t a c k n o w l e d g e - i n t a 0 0 1 r e a d i / o p o r t - i o r c 0 1 0 w r i t e i / o p o r t - i o w c 0 1 1 h a l t n o n e 1 0 0 c o d e a c c e s s - m r d c 1 0 1 r e a d m e m o r y - m r d c 1 1 0 w r i t e m e m o r y - m w t c 1 1 1 p a s s i v e n o n e t a b l e 1 5 . 8 0 8 6 p r o c e s s o r s t a t e / 8 2 8 8 b u s c o n t r o l l e r a c t i v e o u t p u t a s a f u n c t i o n o f - s 0 , - s 1 a n d - s 2
x r 8 8 c 6 8 1 4 8 r e v . 2 . 1 1 f i g u r e 2 1 a n d f i g u r e 2 2 p r e s e n t t h e 8 0 8 6 c p u m o d e , w h e n o p e r a t i n g i n t h e ? m i n ? a n d ? m a x ? m o d e s , r e s p e c t i v e l y . a d 0 - a d 7 a d 8 - a d 1 5 i n t r - i n t a a l e h o l d m / - i o - r d - w r - d e n d t / - r 8 0 8 6 c p u c 7 4 l s 3 7 3 7 4 l s 3 7 3 c d 0 - d 7 a 0 - a 7 d 8 - d 1 5 a 8 - a 1 5 - m e m w - i o r - m e m r - i o w m n / - m x v c c d q d q f i g u r e 2 1 . s c h e m a t i c o f t h e 8 0 8 6 c p u m o d e ( m i n m o d e )
x r 8 8 c 6 8 1 4 9 r e v . 2 . 1 1 - s 0 - s 1 - s 2 m n / - m x - s 0 - s 1 - s 2 c l k d e n d t / - r a l e - i n t a - m r d c - m w t c - i o r c - i o w c 8 2 8 8 b u s c o n t r o l l e r 7 4 l s 3 7 3 7 4 l s 3 7 3 c c - m e m r - m e m w - i o r - i o w a d 0 - a d 7 a d 8 - a d 1 5 i n t r c l k d 0 - d 7 d 8 - d 1 5 a 0 - a 7 a 8 - a 1 5 d q d q 8 0 8 6 c p u f i g u r e 2 2 . s c h e m a t i c o f t h e 8 0 8 6 c p u m o d e ( m a x m o d e ) 8 0 8 6  c i n t e r r u p t p r o c e s s i n g i f a p e r i p h e r a l c o m p o n e n t r e q u i r e s i n t e r r u p t s e r v i c e f r o m t h e c p u , i t w i l l a s s e r t t h e c p u ? s i n t r i n p u t ( b y t o g g l i n g i t h i g h ) . o n c e t h e c p u h a s c o m p l e t e d i t s c u r r e n t i n s t r u c t i o n , i t w i l l a s s e r t t h e - i n t a p i n ( i f o p e r a t i n g i n t h e ? m i n ? m o d e ) o r s e t t h e - s 0 , - s 1 , a n d - s 2 p i n s t o ? 0 ? ( s e e t a b l e 1 5 ) . i n e i t h e r c a s e , t h e - i a c k i n p u t o f t h e p e r i p h e r a l w i l l b e a s s e r t e d . o n c e t h i s h a p p e n s , t h e i n t e r r u p t i n g p e r i p h e r a l i s e x p e c t e d t o p l a c e a n ? i n t e r r u p t v e c t o r ? b y t e o n d 0 - d 7 o f t h e d a t a b u s . t h e 8 0 8 6  p w i l l r e a d t h i s d a t a a n d m u l t i p l y t h i s v a l u e b y t h e n u m b e r 4 i n o r d e r t o d e t e r m i n e t h e l o c a t i o n o f t h e i n t e r r u p t s e r v i c e r o u t i n e i n m e m o r y . s i n c e t h i s ? i n t e r r u p t v e c t o r ? i s 8 b i t s w i d e , t h e 8 0 8 6  p c a n a c c o m m o d a t e u p t o 2 5 6 d i f f e r e n t i n t e r r u p t v e c t o r s ( 0 - 2 5 5 ) . a d d i t i o n a l l y , s i n c e e a c h v e c t o r i s m u l t i p l i e d b y ? 4 ? , t h e u s e r i s e x p e c t e d t o r e s e r v e t h e f i r s t 1 k b y t e o f m e m o r y f o r t h e i n t e r r u p t s e r v i c e r o u t i n e s / j u m p t a b l e . f i g u r e 2 3 p r e s e n t s a s c h e m a t i c o f t h e x r 8 8 c 6 8 1 d u a r t i n t e r f a c i n g t o a ? m i n ? m o d e 8 0 8 6 c p u d e v i c e . p l e a s e n o t e t h a t t h e d u a r t h a s b e e n c o n f i g u r e d t o o p e r a t e i n t h e z - m o d e . t h e r e f o r e , t h e u s e r m u s t a c c o u n t f o r t h e i e i i n p u t t o t h e d u a r t d e v i c e .
x r 8 8 c 6 8 1 5 0 r e v . 2 . 1 1 f i g u r e 2 3 . s c h e m a t i c o f t h e x r 8 8 c 6 8 1 d u a r t d e v i c e i n t e r f a c i n g t o a ? m i n ? m o d e 8 0 8 6 c p u d e v i c e - r d - w r a d 0 - a d 7 a d 8 - a d 1 5 i n t r a l e h o l d m / - i o - r d - w r - d e n d t / - r 8 0 8 6 c p u c 7 4 l s 3 7 3 7 4 l s 3 7 3 c d 0 - d 7 a 0 - a 3 d 8 - d 1 5 a 8 - a 1 5 - m e m w - m e m r m n / - m x v c c - i n t a d 0 - d 7 a 4 - a 7 a d d r e s s d e c o d e r - c s - i n t r - i a c k a 0 - a 3 i e i f r o m h i g h e r p r i o r i t y d e v i c e x r 8 8 c 6 8 1 d q d q d . t i m i n g c o n t r o l b l o c k t h e t i m i n g c o n t r o l b l o c k a l l o w s t o t h e u s e r t o s p e c i f y t h e b i t r a t e s t h a t h e / s h e w i s h e s t o t r a n s m i t a n d r e c e i v e d a t a a t e a c h c h a n n e l . t h e t i m i n g c o n t r o l b l o c k c o n s i s t s o f t h e f o l l o w i n g e l e m e n t s : d o s c i l l a t o r c i r c u i t d b i t r a t e g e n e r a t o r d 1 6 b i t c o u n t e r / t i m e r d 4 - e x t e r n a l i n p u t p i n s ( t o c l o c k t h e t r a n s m i t t e r s a n d r e c e i v e r s , d i r e c t l y ) d t w o c l o c k s e l e c t r e g i s t e r s ( 3 2 : 1 m u x s ) f i g u r e 2 4 p r e s e n t s a b l o c k d i a g r a m o f t h e t i m i n g c o n t r o l b l o c k f o r t h e x r 8 8 c 6 8 1 d e v i c e .
x r 8 8 c 6 8 1 5 1 r e v . 2 . 1 1 p r e s e t r e g i s t e r s ( c t u r , c t l r ) c o u n t e r / t i m e r 3 2 : 1 m u x t x c a 3 2 : 1 m u x r x c a 3 2 : 1 m u x t x c b 3 2 : 1 m u x r x c b i p 2 ( r x c b ) i p 5 ( t x c b ) i p 4 ( r x c a ) i p 3 ( t x c a ) i p 2 d i v i d e b y 1 6 t x c a t x c b a c r [ 4 - 6 ] b i t r a t e g e n e r a t o r a c r [ 7 ] o s c i l l a t o r c i r c u i t x 1 / c l k x 2 d i v i d e b y 1 6 f i g u r e 2 4 . b l o c k d i a g r a m o f d u a r t t i m i n g c o n t r o l b l o c k e a c h e l e m e n t o f t h e t i m i n g c o n t r o l b l o c k i s d i s c u s s e d h e r e : d . 1 o s c i l l a t o r c i r c u i t : a c r y s t a l o s c i l l a t o r i s t y p i c a l l y c o n n e c t e d e x t e r n a l l y a c r o s s t h e x 1 / c l k a n d x 2 p i n s . t h e o s c i l l a t o r c i r c u i t ( w i t h i n t h e c h i p ) f u n c t i o n s a s t h e l o a d f o r t h e r e s o n a n t ( c r y s t a l ) o s c i l l a t o r , a n d b u f f e r s t h e r e s u l t i n g o s c i l l a t i n g s i g n a l , f o r u s e b y t h e b i t r a t e g e n e r a t o r , a n d c o u n t e r / t i m e r . a c r y s t a l o r t t l s i g n a l f r e q u e n c y o f b e t w e e n 2 m h z a n d 4 m h z i s r e q u i r e d f o r p r o p e r o p e r a t i o n o f t h e d u a r t . h o w e v e r , a c r y s t a l o r t t l s i g n a l f r e q u e n c y o f 3 . 6 8 6 4 m h z i s r e q u i r e d f o r t h e g e n e r a t i o n o f s t a n d a r d b i t r a t e s b y t h e b i t r a t e g e n e r a t o r ( s e e t a b l e 1 8 ) . f i g u r e 2 5 p r e s e n t s a r e c o m m e n d e d s c h e m a t i c f o r t h e x t a l o s c i l l a t o r c i r c u i t r y .
x r 8 8 c 6 8 1 5 2 r e v . 2 . 1 1 x r 8 8 c 6 8 1 x 1 x 2 c 1 c 2 r 1 r 2 3 . 6 8 6 4 m h z p a r a l l e l r e s o n a n t c r y s t a l c 1 : 1 0 p f + ( s t r a y < 5 p f ) c 2 : 1 0 p f + ( s t r a y < 5 p f ) r 1 : 1 0 0 o h m r 2 : 1 0 0 o h m f i g u r e 2 5 . a r e c o m m e n d e d s c h e m a t i c f o r t h e x t a l o s c i l l a t o r c i r c u i t r y n o t e : t h e u s e r a l s o h a s a n o p t i o n t o d r i v e t h e o s c i l l a t o r c i r c u i t w i t h a t t l i n p u t s i g n a l , i n l i e u o f u s i n g a c r y s t a l o s c i l l a t o r . i f t h i s a p p r o a c h i s u s e d , t h e t t l m u s t b e d r i v e n i n t o t h e x 1 / c l k p i n , a n d t h e x 2 p i n m u s t b e l e f t f l o a t i n g . i f t h e u s e r d e s i r e s t o r u n n u m e r o u s d u a r t s f r o m a s i n g l e c r y s t a l o s c i l l a t o r , f i g u r e 2 6 p r e s e n t s a n a p p r o a c h a n d t h e n e c e s s a r y c i r c u i t r y t o a c c o m p l i s h t h i s o b j e c t i v e . x 1 x 2 x r 8 8 c 6 8 1 y 1 7 4 h c 1 4 t o x 1 i n p u t s o f o t h e r d u a r t s 3 . 6 8 4 m h z f i g u r e 2 6 . a r e c o m m e n d e d s c h e m a t i c t o d r i v e m u l t i p l e d u a r t s f r o m t h e s a m e c r y s t a l o s c i l l a t o r . n o t e : t h e u s e r i s u r g e d n o t t o u s e t h e 7 4 l s 1 4 s c h m i t t t r i g g e r i n v e r t e r i n l i e u o f t h e 7 4 h c 1 4 d e v i c e . t h e i n p u t o f t h e 7 4 l s 1 4 t e n d s t o l o a d d o w n t h e o s c i l l a t i n g s i g n a l f r o m t h e d u a r t , t o t h e p o i n t t h a t t h e s c h m i t t t r i g g e r i n v e r t e r c a n n o l o n g e r c h a n g e s t a t e o r r e s p o n d t o t h e o s c i l l a t o r s i g n a l .
x r 8 8 c 6 8 1 5 3 r e v . 2 . 1 1 d . 2 b i t r a t e g e n e r a t o r t h e b r g ( b i t r a t e g e n e r a t o r ) a c c e p t s t h e t i m i n g o u t p u t o f t h e o s c i l l a t o r c i r c u i t a n d g e n e r a t e t h e c l o c k s i g n a l f o r 2 3 c o m m o n l y u s e d d a t a c o m m u n i c a t i o n b i t r a t e s r a n g i n g f r o m 5 0 b p s u p t o 1 1 5 . 2 k b p s . p l e a s e n o t e t h a t t h e b r g w i l l o n l y g e n e r a t e t h e s e s t a n d a r d b i t r a t e s i f t h e o s c i l l a t o r c i r c u i t i s r u n n i n g a t 3 . 6 8 6 4 m h z . a d d i t i o n a l l y , t h e a c t u a l c l o c k f r e q u e n c i e s o u t p u t f r o m t h e b r g a r e a t 1 6 t i m e s t h e s e r a t e s . t h e u s e r c a n s e l e c t o n e o f t w o d i f f e r e n t s e t s o f b i t r a t e s , t o b e g e n e r a t e d f r o m t h e b r g . t h i s s e l e c t i o n i s m a d e b y s e t t i n g o r c l e a r i n g a c r [ 7 ] . a l i s t i n g o f t h e s e s e t s o f b i t r a t e s , f r o m t h e b r g , i s p r e s e n t e d i n t h e d i s c u s s i o n o f t h e c l o c k s e l e c t r e g i s t e r s ( c s r s ) i n s e c t i o n d . 5 . a b l o c k d i a g r a m o f t h e b r g c i r c u i t r y i s p r e s e n t e d i n f i g u r e 2 7 . o s c i l l a t o r c i r c u i t x 1 / c l k x 2 b i t r a t e g e n e r a t o r c h a n n e l s a a n d b a c r [ 7 ] c s r b [ 3 : 0 ] 3 2 : 1 m u x t x c b c s r b [ 7 : 4 ] 3 2 : 1 m u x r x c b c s r a [ 7 : 4 ] 3 2 : 1 m u x r x c a c s r a [ 3 : 0 ] 3 2 : 1 m u x t x c a f i g u r e 2 7 . b l o c k d i a g r a m o f t h e b i t r a t e g e n e r a t o r p o r t i o n o f t h e t i m i n g c o n t r o l b l o c k
x r 8 8 c 6 8 1 5 4 r e v . 2 . 1 1 d . 3 c o u n t e r / t i m e r t h e t i m i n g c o n t r o l b l o c k a l s o c o n t a i n s a 1 6 b i t c o u n t e r / t i m e r ( c / t ) . t h e c / t i s a p r o g r a m m a b l e 1 6 b i t d o w n - c o u n t e r w h i c h c a n u s e o n e o f s e v e r a l t i m i n g s o u r c e s a s i t s i n p u t . f i g u r e 2 8 p r e s e n t s a b l o c k d i a g r a m o f t h e c i r c u i t r y s u r r o u n d i n g t h e c / t . t h e s e l e c t i o n o f t h e s e t i m i n g s o u r c e s f o r t h e c o u n t e r / t i m e r c a n b e m a d e b y w r i t i n g t h e a p p r o p r i a t e d a t a t o a c r [ 6 : 4 ] ( a u x i l i a r y c o n t r o l r e g i s t e r b i t s 6 t h r o u g h 4 ) . p l e a s e s e e t a b l e 1 6 f o r t h e r e l a t i o n s h i p b e t w e e n t h e c o u n t e r / t i m e r m o d e , t h e t i m i n g s o u r c e a n d a c r [ 6 : 4 ] . t h e c / t o u t p u t i s a v a i l a b l e t o t h e c l o c k s e l e c t r e g i s t e r s f o r u s e a s a p r o g r a m m a b l e b i t r a t e g e n e r a t o r f o r b o t h t r a n s m i t t e r s a n d r e c e i v e r s . c o u n t e r / t i m e r p r e s e t r e g i s t e r s ( c t u r , c t l r ) i p 2 d i v i d e b y 1 6 o s c i l l a t o r c i r c u i t t x c a t x c b a c r [ 4 - 6 ] c / t _ r d y ( o p 3 ) t o 3 2 : 1 m u x s d i v i d e b y 1 6 f i g u r e 2 8 . a b l o c k d i a g r a m o f t h e c i r c u i t r y a s s o c i a t e d w i t h t h e c o u n t e r / t i m e r b i t 6 b i t 5 b i t 4 c / t m o d e t i m i n g s o u r c e 0 0 0 c o u n t e r e x t e r n a l i n p u t - i p 2 0 0 1 c o u n t e r t x c a 1 x - c l o c k o f c h a n n e l a t r a n s m i t t e r 0 1 0 c o u n t e r t x c b 1 x - c l o c k o f c h a n n e l b t r a n s m i t t e r 0 1 1 c o u n t e r x 1 / c l k i n p u t d i v i d e d b y 1 6 1 0 0 t i m e r e x t e r n a l i n p u t - i p 2 1 0 1 t i m e r e x t e r n a l i n p u t - i p 2 , d i v i d e d b y 1 6 1 1 0 t i m e r x 1 / c l k i n p u t 1 1 1 t i m e r x 1 / c l k i n p u t d i v i d e d b y 1 6 t a b l e 1 6 . a c r [ 6 : 4 ] b i t f i e l d d e f i n i t i o n - c / t
x r 8 8 c 6 8 1 5 5 r e v . 2 . 1 1 d . 3 . 1 t i m e r m o d e : p l e a s e n o t e t h a t o f t h e t w o c / t m o d e s , t h e t i m e r m o d e i s t h e o n l y m o d e w h i c h i s r e l e v a n t t o t h e f u n c t i o n o f b i t r a t e s e l e c t i o n . h o w e v e r , f o r c o m p l e t e n e s s , t h e c o u n t e r m o d e i s a l s o d i s c u s s e d h e r e . i n t h e t i m e r m o d e , t h e c / t a c t s a s a p r o g r a m m a b l e d i v i d e r a n d g e n e r a t e s a s q u a r e w a v e w h o s e p e r i o d i s t w i c e t h e v a l u e ( i n c l o c k p e r i o d s ) o f t h e c o n t e n t s o f t h e c o u n t e r / t i m e r r e g i s t e r s , c t u r a n d c t l r . t h e c / t c a n b e u s e d a s a p r o g r a m m a b l e b i t r a t e g e n e r a t o r i n o r d e r t o p r o d u c e a 1 6 x c l o c k f o r a n y b i t r a t e n o t p r o v i d e d b y t h e b r g . t h e s q u a r e - w a v e , o r i g i n a t i n g f r o m t h e c / t i s o u t p u t o n o u t p u t p o r t p i n , o p 3 . i f t h e c / t i s p r o g r a m m e d t o o p e r a t e i n t h e t i m e r m o d e , t h e f r e q u e n c y o f t h e r e s u l t i n g c / t s q u a r e w a v e c a n b e e x p r e s s e d a s f o l l o w s : c / t o u t p u t f r e q u e n c y = f r e q u e n c y o f s e l e c t e d t i m i n g s o u r c e 2 ( [ c t u r ] 2 8 + [ c t l r ] ) w h e r e : [ c t u r ] = t h e c o n t e n t s o f t h e c t u r r e g i s t e r i n d e c i m a l f o r m [ c t u r ] = t h e c o n t e n t s o f t h e c t l r r e g i s t e r i n d e c i m a l f o r m s i n c e t h e c / t o u t p u t i s h a n d l e d a s a 1 6 x c l o c k s i g n a l b y t h e d u a r t c i r c u i t r y , t h e r e s u l t i n g b i t r a t e i s 1 / 1 6 t h e f r e q u e n c y o f t h e c / t o u t p u t s i g n a l . t h e r e f o r e , t h e b i t r a t e , d e r i v e d f r o m t h e c / t c a n b e e x p r e s s e d a s f o l l o w s : b i t r a t e = f r e q u e n c y o f s e l e c t e d t i m i n g s o u r c e 3 2 ( [ c t u r ] 2 8 + [ c t l r ] ) t h e c o n t e n t s o f t h e c t u r a n d c t l r r e g i s t e r s m a y b e c h a n g e d a t a n y t i m e , b u t w i l l o n l y b e g i n t o t a k e e f f e c t a t t h e n e x t h a l f c y c l e o f t h e s q u a r e w a v e . t h e c / t b e g i n s o p e r a t i o n u s i n g t h e v a l u e s i n c t u r / c t l r u p o n r e c e i p t o f t h e a d d r e s s - t r i g g e r ? s t a r t c o u n t e r ? c o m m a n d ( s e e t a b l e 1 ) . t h e c / t t h e n r u n s c o n t i n u o u s l y . a s u b s e q u e n t ? s t a r t c o u n t e r ? c o m m a n d c a u s e s t h e c / t t o t e r m i n a t e t h e c u r r e n t t i m i n g c y c l e a n d b e g i n a n e w t i m i n g c y c l e u s i n g t h e c u r r e n t v a l u e s s t o r e d i n c t u r a n d c t l r . t h e c o u n t e r r e a d y s t a t u s b i t , i n t h e i n t e r r u p t s t a t u s r e g i s t e r ( i s r [ 3 ] ) , i s s e t o n c e e a c h c y c l e o f t h e s q u a r e w a v e . t h i s a l l o w s t h e u s e o f t h e c / t a s a p e r i o d i c i n t e r r u p t g e n e r a t o r , i f t h e c o n d i t i o n i s p r o g r a m m e d t o g e n e r a t e a n i n t e r r u p t v i a t h e i n t e r r u p t m a s k r e g i s t e r ( i m r ) . t h e i s r [ 3 ] c a n b e c l e a r e d b y i s s u i n g t h e a d d r e s s - t r i g g e r e d ? s t o p c o u n t e r ? c o m m a n d ( s e e t a b l e 1 ) . i n t h e t i m e r m o d e , h o w e v e r , t h e c o m m a n d d o e s n o t a c t u a l l y s t o p t h e c / t . d . 3 . 2 c o u n t e r m o d e i n t h e c o u n t e r m o d e , t h e c / t c o u n t s d o w n t h e n u m b e r o f p u l s e s w r i t t e n i n t o c t u r / c t l r , b e g i n n i n g a t t h e r e c e i p t o f a ? s t a r t c o u n t e r ? c o m m a n d . t h e c o u n t e r / r e a d y s t a t u s b i t ( i s r [ 3 ] ) i s s e t u p o n r e a c h i n g t h e c o u n t o f 0 0 0 0 1 6 . t h e c / t w i l l c o n t i n u e t o c o u n t p a s t t h e 0 0 0 0 1 6 a n d u n d e r f l o w ( w i t h t h e n e x t c o u n t b e i n g f f f f 1 6 ) u n t i l i t i s s t o p p e d b y t h e c p u v i a a ? s t o p c o u n t e r ? c o m m a n d . i f o p 3 i s p r o g r a m m e d t o b e t h e o u t p u t o f t h e c / t , t h e o u t p u t w i l l r e m a i n h i g h u n t i l t h e t e r m i n a l c o u n t i s r e a c h e d , a t w h i c h t i m e t h e o u t p u t g o e s l o w . i t t h e n r e t u r n s t o t h e h i g h s t a t e a n d i s r [ 3 ] i s c l e a r e d w h e n t h e c / t i s s t o p p e d ( v i a t h e ? s t o p c o u n t e r ? c o m m a n d ) . a ? s t a r t c o u n t e r ? c o m m a n d w h i l e t h e c o u n t e r i s r u n n i n g r e s t a r t s t h e c o u n t e r w i t h t h e v a l u e s i n c t u r / c t l r . t h e c p u m a y c h a n g e t h e c o n t e n t s o f c t u r o r c t l r a t a n y t i m e b u t t h e n e w c o u n t t a k e s e f f e c t o n l y o n a f t e r t h e s u b s e q u e n t s t a r t c o u n t e r c o m m a n d . i f n e w v a l u e s a r e n o t p r o g r a m m e d t h e p r e v i o u s v a l u e s a r e p r e s e r v e d a n d u s e d f o r t h e n e x t c y c l e . d . 4 e x t e r n a l i n p u t s t h e d u a r t a l l o w s f o r s o m e o f t h e i n p u t p o r t p i n s ( i p 2 - i p 5 ) t o b e u s e d a s d i r e c t e x t e r n a l i n p u t s t o t h e t i m i n g c o n t r o l b l o c k a s t i m i n g s o u r c e s f o r t h e t r a n s m i t t e r s a n d r e c e i v e r s o f b o t h c h a n n e l s . p l e a s e n o t e t h a t t h e u s e r c a n s p e c i f y w h e t h e r a c l o c k s i g n a l , a p p l i e d t o o n e o f t h e s e e x t e r n a l i n p u t s , i s a 1 x o r a 1 6 x c l o c k s i g n a l ; v i a t h e c l o c k s e l e c t r e g i s t e r s ( s e e s e c t i o n d . 5 ) . f o r a m o r e d e t a i l e d d i s c u s s i o n o n t h e i n p u t p o r t p i n s a n d t h e i r f u n c t i o n , p l e a s e s e e s e c t i o n e . d . 5 c l o c k s e l e c t r e g i s t e r s , c s r a a n d c s r b i n f i g u r e 2 4 , t h e c l o c k s e l e c t r e g i s t e r s a r e t h e 3 2 : 1 m u x ? s . t h e c l o c k s e l e c t r e g i s t e r s a r e t h e m e a n s t h a t t h e u s e r c a n s e l e c t w h i c h c l o c k s i g n a l s w i l l d r i v e t h e t r a n s m i t t e r s a n d r e c e i v e r s o f b o t h c h a n n e l s . t h e c s r s a l l o w t h e u s e r t o s e l e c t t h e 2 3 d i f f e r e n t s t a n d a r d b i t r a t e s f r o m t h e b r g , t h e c o u n t e r / t i m e r o u t p u t , o r t o u s e a n e x t e r n a l i n p u t a s t h e t i m i n g s o u r c e f o r t h e t r a n s m i t t e r s
x r 8 8 c 6 8 1 5 6 r e v . 2 . 1 1 a n d r e c e i v e r s . t a b l e 1 7 a n d t a b l e 1 8 p r e s e n t t h e r e l a t i o n s h i p b e t w e e n t h e c o n t e n t s o f t h e c s r s a n d t h e c l o c k s o u r c e d r i v i n g t h e t r a n s m i t t e r s a n d r e c e i v e r s . b i t 7 b i t 6 b i t 5 b i t 4 b i t 3 b i t 2 b i t 1 b i t 0 r e c e i v e r c l o c k s e l e c t t r a n s m i t t e r c l o c k s e l e c t s e e t a b l e 1 8 s e e t a b l e 1 8 t a b l e 1 7 . b i t f o r m a t o f t h e c l o c k s e l e c t r e g i s t e r s , c s r a a n d c s r b f i e l d b i t r a t e c s r [ 7 : 4 ] a c r [ 7 ] = 0 a c r [ 7 ] = 1 c s r [ 3 : 0 ] x = 0 x = 1 x = 0 x = 1 0 0 0 0 5 0 7 5 7 5 5 0 0 0 0 1 1 1 0 1 1 0 1 1 0 1 1 0 0 0 1 0 1 3 4 . 5 1 3 4 . 5 1 3 4 . 5 1 3 4 . 5 0 0 1 1 2 0 0 1 5 0 1 5 0 2 0 0 0 1 0 0 3 0 0 3 6 0 0 3 0 0 3 6 0 0 0 1 0 1 6 0 0 1 4 . 4 k 6 0 0 1 4 . 4 k 0 1 1 0 1 2 0 0 2 8 . 8 k 1 2 0 0 2 8 . 8 k 0 1 1 1 1 0 5 0 5 7 . 6 k 2 0 0 0 5 7 . 6 k 1 0 0 0 2 4 0 0 1 1 5 . 2 k 2 4 0 0 1 1 5 . 2 k 1 0 0 1 4 8 0 0 4 8 0 0 4 8 0 0 4 8 0 0 1 0 1 0 7 2 0 0 1 8 0 0 1 8 0 0 7 2 0 0 1 0 1 1 9 6 0 0 9 6 0 0 9 6 0 0 9 6 0 0 1 1 0 0 3 8 . 4 k 1 9 . 2 k 1 9 . 2 k 3 8 . 4 k 1 1 0 1 t i m e r t i m e r t i m e r t i m e r 1 1 1 0 e x t e r n a l - 1 6 x e x t e r n a l - 1 6 x e x t e r n a l - 1 6 x e x t e r n a l - 1 6 x 1 1 1 1 e x t e r n a l - 1 x e x t e r n a l - 1 x e x t e r n a l - 1 x e x t e r n a l - 1 x n o t e : t h e b s u f f i x d e n o t e s a b i n a r y e x p r e s s i o n . x = d o n ? t c a r e v a l u e . t a b l e 1 8 . b i t f o r m a t o f t h e c l o c k s e l e c t r e g i s t e r s , c s r [ 3 : 0 ] a n d c s r [ 7 : 4 ] p l e a s e n o t e t h a t t a b l e 1 8 c a l l s f o r t h e u s e r t o s p e c i f y t h e f o l l o w i n g p a r a m e t e r s : d a c r [ 7 ] - t h e m o s t s i g n i f i c a n t b i t ( m s b ) o f t h e a u x i l - i a r y c o n t r o l r e g i s t e r d x - t h e e x t e n d b i t a c r [ 7 ] i s t h e m s b o f t h e a u x i l i a r y c o n t r o l r e g i s t e r , a n d c a n e a s i l y b e p r o g r a m m e d b y w r i t i n g 1 x x x x x x x b o r 0 x x x x x x x b t o t h e a c r , i n o r d e r t o s e t o r c l e a r , r e s p e c t i v e l y . x - t h e s e l e c t e x t e n d b i t e a c h t r a n s m i t t e r a n d r e c e i v e r , w i t h i n t h e d u a r t h a s a n e x t e n d b i t t h a t c a n b e s e t o r c l e a r e d b y w r i t i n g t h e a p p r o p r i a t e d a t a t o t h e c h a n n e l ? s c o m m a n d r e g i s t e r . a l t h o u g h t h i s i n f o r m a t i o n c a n b e f o u n d i n t a b l e 3 . t a b l e 1 9 s u m m a r i z e s t h e s e c o m m a n d s , a n d t h e i r e f f e c t o n t h e e x t e n d b i t s .
x r 8 8 c 6 8 1 5 7 r e v . 2 . 1 1 r e g i s t e r c o n t e n t s r e s u l t i n g a c t i o n c o m m a n d r e g i s t e r a , c r a 0 8 1 6 s e t r x b r g s e l e c t e x t e n d b i t ( x = 1 ) c o m m a n d r e g i s t e r a , c r a 0 9 1 6 c l e a r r x b r g s e l e c t e x t e n d b i t ( x = 0 ) c o m m a n d r e g i s t e r b , c r b 0 a 1 6 s e t t x b r g s e l e c t e x t e n d b i t ( x = 1 ) c o m m a n d r e g i s t e r b , c r b 0 b 1 6 c l e a r t x b r g s e l e c t e x t e n d b i t ( x = 1 ) t a b l e 1 9 . c o m m a n d r e g i s t e r c o n t r o l s o v e r t h e e x t e n d b i t n o t e : i f t h e u s e r p r o g r a m s e i t h e r n i b b l e o f t h e c l o c k s e l e c t r e g i s t e r ( c s r n [ 7 : 4 ] o r c s r n [ 3 : 0 ] ) w i t h v a l u e s r a n g i n g f r o m 0 1 6 t o c 1 6 , t h e n t h e u s e r i s u s i n g t h e b r g a s a s o u r c e f o r t i m i n g . h o w e v e r , t h e s e s t a n d a r d b i t r a t e s ( p r e s e n t e d i n t a b l e 1 8 ) a p p l y o n l y i f t h e x 1 / c l k p i n i s d r i v e n w i t h a 3 . 6 8 6 4 m h z s i g n a l . i f a s i g n a l w i t h a d i f f e r e n t f r e q u e n c y ( f o ) i s a p p l i e d t o t h e x 1 / c l k p i n , t h e n t h e d u a r t c h a n n e l i s r u n n i n g a t t h e f o l l o w i n g b a u d r a t e : a c t u a l b a u d r a t e = [ t a b l e 6 b a u d r a t e v a l u e ] f o 3 . 6 8 6 4 m h z p r o v i d e d t h a t f o i s b e t w e e n 2 . 0 m h z a n d 4 . 0 m h z . a d d i t i o n a l l y , a s i n t h e c a s e f o r s t a n d a r d b a u d r a t e s , t h e a c t u a l f r e q u e n c y o f t h e c l o c k s i g n a l w i l l b e 1 6 t i m e s t h e s e v a l u e s . 1 x v s 1 6 x c l o c k s i g n a l s t h e t e r m s ? 1 x c l o c k ? a n d ? 1 6 x c l o c k ? h a v e b e e n a p p l i e d t h r o u g h o u t t h i s t e x t . t h e r e f o r e , i t i s i m p o r t a n t t o d i s c u s s t h e i r m e a n i n g a n d s i g n i f i c a n c e . a ? 1 6 x c l o c k ? o v e r - s a m p l e s t h e r e c e i v e d s e r i a l d a t a b y a f a c t o r o f 1 6 . w h e r e a s a ? 1 x c l o c k ? o n l y s a m p l e s t h e s i g n a l s o n c e p e r b i t p e r i o d . f r o m t h i s o n e s h o u l d c o r r e c t l y c o n c l u d e t h a t g r e a t e r a c c u r a c y ( l o w e r b i t e r r o r r a t e s ) a r e a c h i e v e d v i a t h e u s e o f t h e 1 6 x c l o c k i n l i e u o f t h e 1 x c l o c k . t h e f o l l o w i n g p a r a g r a p h s w i l l c l a r i f y t h e r e a s o n s . a r e c e i v e r i n o n e o f t h e d u a r t c h a n n e l s i s c l o c k e d b y a l o c a l t i m i n g s o u r c e ( f r o m t h e t i m i n g c o n t r o l b l o c k ) . i f t h i s r e c e i v e r i s a c t i v e a n d i s r e c e i v i n g d a t a f r o m a r e m o t e s e r i a l t r a n s m i t t e r , t h a t t r a n s m i t t e r i s a l s o c l o c k e d b y i t s o w n l o c a l t i m i n g s o u r c e . h e n c e , t h e r e i s n o g u a r a n t e e t h a t t h e c l o c k f r e q u e n c y f o r t h e r e c e i v e r i s e x a c t l y t h e s a m e a s t h a t f o r t h e r e m o t e t r a n s m i t t e r . t h i s i s a c h a r a c t e r i s t i c o f a s y n c h r o n o u s s e r i a l d a t a c o m m u n i c a t i o n . a l t h o u g h t h e r e c e i v e r a n d r e m o t e t r a n s m i t t e r h a v e b e e n p r o g r a m m e d t o r e c e i v e a n d t r a n s m i t d a t a a t e x a c t l y t h e s a m e b a u d r a t e , s u f f i c i e n t d i f f e r e n c e s i n t h e f r e q u e n c i e s o f t h e t w o c l o c k s o u r c e s ( l o c a l r e c e i v e r a n d r e m o t e t r a n s m i t t e r ) c a n c o n t r i b u t e t o b i t e r r o r s i n t h e r e c e i v i n g p r o c e s s , a s p r e s e n t e d i n t h e f o l l o w i n g d i s c u s s i o n . s u p p o s e t h a t w e h a v e a s e r i a l d a t a t r a n s m i s s i o n s y s t e m a s d e p i c t e d i n f i g u r e 2 9 . t h i s s y s t e m c o n s i s t s o f a r e m o t e t r a n s m i t t e r ( t x ) , a n d a l o c a l r e c e i v e r ( r x ) . t r a n s m i t t e r t x r e c e i v e r r x t x c l o c k r x c l o c k f i g u r e 2 9 . e x a m p l e o f a s e r i a l d a t a t r a n s m i s s i o n s y s t e m l e t u s f u r t h e r a s s u m e t h a t t h e r e c e i v e r i s c l o c k e d b y a s o u r c e t h a t i s s l i g h t l y f a s t e r t h a n t h a t o f t h e t r a n s m i t t e r , a n d t h a t t h e r e c e i v e r i s o n l y s a m p l i n g t h e s e r i a l d a t a o n c e p e r b i t p e r i o d . f i g u r e 3 0 p r e s e n t s t h e r e s u l t s o f t h i s p h e n o m e n o n .
x r 8 8 c 6 8 1 5 8 r e v . 2 . 1 1 f i g u r e 3 0 . r e c e i v e r ( 1 x ) s a m p l i n g , i f t h e r x c l o c k i s s l i g h t l y f a s t e r t h a n t h e t x c l o c k f i g u r e 3 0 s h o w s t h a t t h e p h a s e r e l a t i o n s h i p b e t w e e n t h e r e c e i v e r ? s s a m p l i n g p o i n t a n d e a c h s e r i a l d a t a b i t i s c h a n g i n g . i n t h i s c a s e , t h e r e c e i v e r i s s a m p l i n g e a c h s e r i a l d a t a b i t , e a r l i e r a n d e a r l i e r i n t h e b i t p e r i o d , w i t h e a c h s u c c e s s i v e d a t a b i t . t h i s p h e n o m e n o n i s k n o w n a s r e c e i v e r d r i f t . i f t h e r e i s n o c o r r e c t i o n f o r r e c e i v e r d r i f t , t h e r e w i l l b e m a n y e r r o r s i n t h e t r a n s m i s s i o n a n d r e c e p t i o n o f t h i s s e r i a l d a t a , a s d e p i c t e d i n f i g u r e 3 1 . a c t u a l d a t a r e c e i v e d d a t a f i g u r e 3 1 . i l l u s t r a t i o n o f a n e r r o r d u e t o r e c e i v e r d r i f t 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 0 1 f i g u r e 3 1 s h o w s t h e r e c e i v e r s a m p l i n g a n e i g h t b i t s t r i n g o f d a t a w i t h b i t p a t t e r n 0 1 0 1 0 1 0 . i t i s i n t e r e s t i n g t o n o t e t h a t , i n f i g u r e 3 1 , t h e r e c e i v e r s a m p l e d 0 1 0 1 0 0 1 0 . i t s h o u l d b e n o t e d t h a t r e c e i v e r d r i f t c a n a l s o b e a p r o b l e m i s t h e l o c a l r e c e i v e r i s s l o w e r t h a n t h e r e m o t e t r a n s m i t t e r c l o c k .
x r 8 8 c 6 8 1 5 9 r e v . 2 . 1 1 i n g e n e r a l t h e b i t - e r r o r - r a t e , f o r t h i s ? u n c o r r e c t e d ? s y s t e m i s a f u n c t i o n o f t h e t i m i n g d i f f e r e n c e s b e t w e e n t h e t x a n d r x l o c a l c l o c k s i g n a l s . h o w e v e r , i n o r d e r t o c o r r e c t f o r r e c e i v e r d r i f t a n d t o m i n i m i z e t h e b e r d u r i n g s e r i a l d a t a t r a n s m i s s i o n , m a n y u a r t s i n t h e m a r k e t p l a c e , e m p l o y r e c e i v e r o v e r s a m p l i n g o f t h e s t a r t b i t . w h e n t h i s f e a t u r e i s e m p l o y e d , t h e r e c e i v e r , u p o n d e t e c t i o n o f t h e s t a r t b i t , w i l l b e g i n o v e r s a m p l i n g t h i s s t a r t b i t b y s o m e i n t e g e r f a c t o r . t y p i c a l l y , f o r m o s t p r e s e n t d a y u a r t s , t h i s o v e r - s a m p l e f a c t o r i s 1 6 . ( t h e x r 8 8 c 6 8 1 d e v i c e a l s o a c c o m m o d a t e s 1 6 x r e c e i v e r o v e r s a m p l i n g o f t h e s t a r t b i t ) . t h e r e f o r e , i n t h e s e d e v i c e s , w h e n t h e r e c e i v e r d e t e c t s t h e o c c u r r e n c e o f a s t a r t b i t , i t ( t h e r e c e i v e r ) w i l l b e g i n o v e r s a m p l i n g t h i s s t a r t b i t b y a f a c t o r o f 1 6 . h o w e v e r , a f t e r 7 1 6 x c l o c k p e r i o d s h a s e l a p s e d , t h e r e c e i v e r w i l l a s s u m e t h i s p o i n t ( w i t h i n t h e s t a r t b i t ) t o b e t h e m i d p o i n t o f t h e b i t p e r i o d , a n d w i l l c e a s e o v e r s a m p l i n g o f t h e s t a r t b i t a n d o f t h e s u b s e q u e n t d a t a . f r o m t h i s p o i n t , t h r o u g h t h e e n d o f t h e c h a r a c t e r , t h e r e c e i v e r w i l l s a m p l e t h e s e r i a l d a t a s t r e a m a t t h e 1 x r a t e . s t a t e d a n o t h e r w a y , o n c e t h e r e c e i v e r h a s r e a c h e d , w h a t i t b e l i e v e s t o b e t h e m i d - p o i n t o f t h e s t a r t b i t , t h e r e c e i v e r w i l l , f r o m t h a t p o i n t , b e g i n s a m p l i n g t h e s e r i a l d a t a a t 1 - b i t p e r i o d i n t e r v a l ( s e e f i g u r e 3 2 ) . a f t e r t h e r e c e i v e r h a s r e c e i v e d t h e s t o p b i t , i t w i l l a w a i t t h e o c c u r r e n c e o f t h e s t a r t b i t . o n c e t h e s t a r t b i t h a s b e e n d e t e c t e d , t h i s o v e r s a m p l i n g p r o c e d u r e i s r e p e a t e d . 7 - 1 6 x c l o c k p e r i o d s c h o s e n a s t h e m i d p o i n t o f t h e b i t 1 b i t p e r i o d f i g u r e 3 2 . t h e t y p i c a l s a m p l i n g p a t t e r n o f e a c h r e c e i v e r w i t h i n t h e x r 8 8 c 6 8 1 d e v i c e .
x r 8 8 c 6 8 1 6 0 r e v . 2 . 1 1 t h e o v e r s a m p l i n g t e c h n i q u e m i t i g a t e s m a n y o f t h e s e r i a l d a t a b i t e r r o r s b y a t t e m p t i n g t o a d j u s t t h e r e c e i v e r s a m p l i n g p o i n t , t o n e a r t h e m i d p o i n t o f t h e b i t p e r i o d s , o n a c h a r a c t e r t o c h a r a c t e r b a s i s . t h i s a p p r o a c h i s s u c c e s s f u l f o r t w o r e a s o n s : 1 . i t o f f e r s p e r i o d i c c o r r e c t i o n t o t h e r e c e i v e r s a m p l i n g p o i n t . 2 . i t l i m i t s t h e r e c e i v e r d r i f t p h e n o m e n o n ( b e t w e e n s a m p l i n g p o i n t a d j u s t m e n t s ) t o t y p i c a l l y a t m o s t 1 2 b i t s ( 8 b i t c h a r a c t e r + p a r i t y a n d s t o p b i t s ) . t h e r e f o r e , i f t h e u s e r s e l e c t s t o r e c e i v e d a t a a t a b a u d r a t e o f 9 6 0 0 b a u d ; u p o n d e t e c t i o n o f t h e s t a r t b i t , t h e r e c e i v e r w i l l b e g i n s a m p l i n g t h e d a t a a t ( 9 6 0 0 x 1 6 ) = 1 5 3 , 6 0 0 h z . h o w e v e r , o n c e t h e r e c e i v e r h a s o v e r s a m p l e d u p t o t h e 7 t h 1 5 3 . 6 k h z c l o c k p u l s e , i t w i l l m a r k t h i s l o c a t i o n a s t h e m i d p o i n t o f t h e s t a r t b i t . f r o m t h i s p o i n t o n , t h e 1 5 3 . 6 k h z c l o c k s i g n a l i s d i v i d e d b y 1 6 t o g e n e r a t e t h e s a m p l e c l o c k ( 9 6 0 0 h z ) f o r t h e r e m a i n i n g d a t a a n d o v e r h e a d b i t s o f t h e c h a r a c t e r . t h e x r 8 8 c 6 8 1 d e v i c e s g i v e s t h e u s e r t h e o p t i o n t o d e c l a r e a n e x t e r n a l i n p u t c l o c k s i g n a l a s e i t h e r a 1 x o r 1 6 x c l o c k s i g n a l . w h e n e v e r t h e u s e r i s g i v e n a c h o i c e t o u s e e i t h e r t h e 1 x o r 1 6 x c l o c k s i g n a l ( p e r t h e c l o c k s e l e c t r e g i s t e r s ) , t h e u s e r i s a d v i s e d t o a l w a y s u s e t h e 1 6 x c l o c k , i n o r d e r t o m i t i g a t e t h e e f f e c t s o f r e c e i v e r d r i f t . t h e u s e r i s f u r t h e r a d v i s e d n e v e r t o u s e t h e 1 x c l o c k f e a t u r e s o f t h e d u a r t , u n l e s s t h e i n c o m i n g s e r i a l d a t a s t r e a m i s s y n c h r o n o u s w i t h t h e r e c e i v e r ( 1 x ) c l o c k . d . 6 a p p l i c a t i o n e x a m p l e s u s i n g t h e t i m i n g c o n t r o l b l o c k i n o r d e r t o c l a r i f y t h e r o l e s o f t h e a s s e t s w i t h i n t h e t i m i n g c o n t r o l b l o c k , t h r e e e x a m p l e s a r e i n c l u d e d . e x a m p l e a : u s i n g t h e b r g s u p p o s e t h a t t h e u s e r w i s h e s t o r e c e i v e a n d t r a n s m i t d a t a a t a r a t e o f 1 1 5 . 2 k b p s v i a c h a n n e l a . t h e u s e r m u s t d o t h e f o l l o w i n g : 1 . u s e a 3 . 6 8 6 4 m h z c r y s t a l o s c i l l a t o r a c r o s s t h e x 1 / c l k a n d x 2 p i n s ; o r d r i v i n g a 3 . 6 8 6 4 m h z t t l s i g n a l i n t o t h e x 1 / c l k p i n ( w i t h t h e x 2 p i n f l o a t i n g ) . 2 . w r i t e 0 a 1 6 t o c o m m a n d r e g i s t e r a . t h i s s t e p w i l l s e t t h e t r a n s m i t t e r b r g s e l e c t e x t e n d b i t ( x = 1 ) . 3 . w r i t e 0 8 1 6 t o c o m m a n d r e g i s t e r a . t h i s s t e p w i l l s e t t h e r e c e i v e r b r g s e l e c t e x t e n d b i t ( x = 1 ) . 4 . w r i t e 1 x x x x x x x b t o a c r t h i s s t e p s e l e c t s ? b i t r a t e ? s e t # 2 p e r t a b l e 1 8 o f t h i s d a t a s h e e t . w h e r e t h e b s u f f i x d e n o t e s a b i n a r y e x p r e s s i o n , a n d x d e n o t e s a ? d o n ? t c a r e ? v a l u e f o r t h e b i n a r y e x p r e s s i o n . 5 . w r i t e 8 8 1 6 t o c s r a . t h i s s t e p s e t s t h e r e c e i v e a n d t r a n s m i t b i t r a t e f o r c h a n n e l a t o 1 1 5 . 2 k b p s ( p e r t a b l e 1 7 a n d t a b l e 1 8 ) . e x a m p l e b : p r o g r a m m i n g t h e b i t r a t e v i a t h e c o u n t e r / t i m e r s u p p o s e t h e u s e r w i s h e s t o t r a n s m i t a n d r e c e i v e d a t a a t 6 2 . 5 k b p s v i a c h a n n e l b . p l e a s e n o t e t h a t t h i s p a r t i c u l a r b i t r a t e i s n o t o f f e r e d b y t h e b r g . i n t h i s c a s e t h e u s e r c a n d o t h e f o l l o w i n g . 1 . d r i v e a 4 m h z t t l s i g n a l i n t o t h e x 1 / c l k p i n , w h i l e t h e x 2 p i n i s l e f t f l o a t i n g . 2 . w r i t e 0 0 1 6 t o c t u r a n d 0 2 1 6 t o c t l r . t h i s s t e p s r e s u l t s i n t h e c / t g e n e r a t i n g a s q u a r e w a v e o f f r e q u e n c y = 4 m h z / 2 . [ 2 ] = 1 m h z . 3 . w r i t e 1 1 0 b t o a c r [ 6 : 4 ] t h i s w i l l s e t t h e c / t i n t o t h e t i m e r m o d e , a n d s e l e c t t h e t i m i n g s o u r c e f o r t h e c / t t o b e t h e x 1 / c l k i n p u t . 4 . w r i t e d d 1 6 t o c s r b . t h i s w i l l s p e c i f y t h a t t h e t i m i n g s o u r c e f o r t h e r e c e i v e r a n d t r a n s m i t t e r o f c h a n n e l b w i l l b e d e r i v e d f r o m t h e c / t . p l e a s e n o t e t h a t w h e n t h e d u a r t i s p r o g r a m m e d i n t h i s c o n f i g u r a t i o n , t h e c / t o u t p u t r e p r e s e n t s a 1 6 x o v e r s a m p l e o f t h e t r a n s m i t t e d a n d r e c e i v e d d a t a . t h e r e f o r e , t h e c h i p c i r c u i t r y w i l l d i v i d e t h e 1 m h z s q u a r e w a v e b y 1 6 , j u s t l i k e f o r c l o c k s i g n a l s o r i g i n a t i n g f r o m t h e b r g . t h u s : b i t r a t e = 1 m h z / 1 6 = 6 2 . 5 k b p s . e x a m p l e c : u s i n g t h e e x t e r n a l i n p u t p o r t s s u p p o s e t h a t , i n a d d i t i o n t o r u n n i n g c h a n n e l b a t 6 2 . 5 k b p s ( s e e e x a m p l e b ) , h e / s h e w a n t s t o t r a n s m i t a n d r e c e i v e d a t a a t 1 m b p s v i a c h a n n e l a . t h e u s e r n e e d s t o p e r f o r m a l l o f t h e s t e p s p r e s e n t e d i n e x a m p l e b , a l o n g w i t h t h e f o l l o w i n g : 1 . w r i t e x x x x 0 1 x x b t o t h e o p c r ( o u t p u t p o r t c o n f i g u r a t i o n r e g i s t e r ) . t h i s s t e p a l l o w s t h e 1 m h z s q u a r e w a v e f r o m t h e c / t t o b e o u t p u t o n o p 3 . n o t e : x = d o n ? t c a r e t h e b s u f f i x d e n o t e s a b i n a r y e x p r e s s i o n
x r 8 8 c 6 8 1 6 1 r e v . 2 . 1 1 2 . e x t e r n a l l y c o n n e c t t h e o p 3 p i n t o t h e i p 3 a n d i p 4 p i n s . t h e r e b y a p p l y i n g a 1 m h z s q u a r e w a v e i n t o t h e s e t w o i n p u t p i n s . 3 . w r i t e f f 1 6 t o c s r a . t h i s s t e p w i l l s p e c i f y t h a t t h e t i m i n g s o u r c e f o r t h e t r a n s m i t t e r a n d r e c e i v e r o f c h a n n e l a w i l l b e d e r i v e d f r o m i n p u t p i n s i p 3 a n d i p 4 , r e s p e c t i v e l y . a d d i t i o n a l l y , t h i s s t e p a l l o w t h e d u a r t h a r d w a r e t o p r e s u m e t h a t t h e s e i n p u t s i g n a l a r e 1 x s i g n a l s . h e n c e , t h e r e i s n o d i v i s i o n - b y - 1 6 o f t h i s s i g n a l . t h e r e f o r e , t h e b i t r a t e o f c h a n n e l a i s a t 1 m b p s . p l e a s e n o t e t h a t i f t h e u s e r w e r e t o a p p l y t h i s e x a m p l e , h e / s h e w o u l d b e r e s p o n s i b l e f o r e n s u r i n g t h a t t h e i n c o m i n g s e r i a l d a t a s t r e a m i s s y n c h r o n o u s w i t h t h e 1 m h z ( 1 x ) c l o c k s i g n a l ; i n o r d e r t o m i n i m i z e b i t e r r o r s . d . 7 e x p l a n a t i o n o f c l o c k t i m i n g s i g n a l s t h e p u r p o s e o f t h i s s e c t i o n i s t o e x p l a i n t h e d a t a s h e e t s p e c i f i c a t i o n o n t h e t i m i n g c o n t r o l b l o c k p a r a m e t e r s . i n t h e p a s t , t h i s s u b j e c t h a s b e e n t h e s o u r c e o f c o n s i d e r a b l e c o n f u s i o n b y n u m e r o u s u s e r s . t h e x r 8 8 c 6 8 1 d a t a s h e e t p r e s e n t s t h e f o l l o w i n g p a r a m e t e r s p e c i f i c a t i o n s i n t h e ? a c e l e c t r i c a l c h a r a c t e r i s t i c s ? s y m b o l p a r a m e t e r m i n . t y p . m a x . u n i t s t c l k x 1 / c l k ( e x t e r n a l ) h i g h o r l o w t i m e 1 0 0 n s f c l k x 1 / c l k c r y s t a l o r e x t e r n a l f r e q u e n c y 2 . 0 3 . 6 8 6 4 4 . 0 m h z t c t c c o u n t e r / t i m e r e x t e r n a l c l o c k h i g h o r l o w t i m e - i p 2 i n p u t 1 0 0 n s f c t c c o u n t e r / t i m e r e x t e r n a l c l o c k f r e q u e n c y - i p 2 i n p u t 0 4 . 0 m h z t r t x r x c a n d t x c ( e x t e r n a l ) h i g h o r l o w t i m e - v i a i p 2 , i p 3 , i p 4 a n d i p 5 2 2 0 n s f r t x r x c a n d t x c ( e x t e r n a l ) f r e q u e n c y - v i a i p 2 , i p 3 , i p 4 , a n d i p 5 f r t x - 1 6 x f r t x - 1 x 1 6 x 1 x 0 0 2 . 0 1 . 0 m h z m h z t a b l e 2 0 . c l o c k t i m i n g ( f i g u r e 1 3 ) n o w , h e r e i s a n e x p l a n a t i o n f o r e a c h o f t h e s e p a r a m e t e r s . d t c l k - x 1 / c l k ( e x t e r n a l ) h i g h o r l o w t i m e t h e d u a r t e m p l o y s d y n a m i c l o g i c t h r o u g h o u t m u c h o f i t s c i r c u i t r y . t h e r e f o r e , l i m i t s o n t c l k a n d f c l k a r e n e e d e d i n o r d e r t o e n s u r e t h a t t h e d e v i c e w i l l f u n c t i o n p r o p e r l y . t h i s p a r a m e t e r j u s t p l a c e s a l o w e r l i m i t o n t h e a m o u n t o f t i m e a t t h e s i g n a l a p p l i e d t h r o u g h t h e x 1 / c l k p i n m u s t r e s i d e a t t h e h i g h a n d l o w s t a t e s . d f c l k - x 1 / c l k c r y s t a l h i g h o r l o w t i m e t h i s p a r a m e t e r s p e c i f i e s t h e r a n g e o f f r e q u e n c i e s p e r m i s s i b l e a t t h e x 1 / c l k i n p u t , v i a e i t h e r c r y s t a l o s c i l l a t o r o r a p p l i e d t t l i n p u t s i g n a l . t h e r e f o r e , t h e u s e c a n o n l y a p p l y b e t w e e n 2 . 0 a n d 4 . 0 m h z a t t h i s i n p u t . d t c t c - c o u n t e r / t i m e r e x t e r n a l c l o c k h i g h o r l o w t i m e - i p 2 i n p u t t h i s p a r a m e t e r p l a c e s a l o w e r l i m i t o n t h e a m o u n t o f t i m e t h a t t h e s i g n a l , b e i n g a p p l i e d t o t h e i p 2 p i n , f o r u s e b y t h e c o u n t e r / t i m e r , c a n r e s i d e a t t h e h i g h a n d l o w s t a t e s . p l e a s e n o t e t h a t t h i s l i m i t h a s n o r e l a t i o n s h i p w i t h t h e p a r a m e t e r t r t x , w h i c h i s a n o t h e r s p e c a s s o c i a t e d w i t h t h e i p 2 i n p u t . d f c t c - c o u n t e r / t i m e r e x t e r n a l c l o c k f r e q u e n c y - i p 2 i n p u t t h i s p a r a m e t e r p l a c e s a n u p p e r l i m i t o f t h e i n p u t f r e q u e n c y b e i n g a p p l i e d t o t h e i p 2 p i n , f o r u s e b y t h e c o u n t e r / t i m e r . t h e s p e c b a s i c a l l y s t a t e s t h a t a s i g n a l w i t h f r e q u e n c y u p t o 4 . 0 m h z c a n b e a p p l i e d a t t h e i p 2 p i n , a n d s t i l l b e p r o p e r l y h a n d l e d b y t h e c o u n t e r / t i m e r .
x r 8 8 c 6 8 1 6 2 r e v . 2 . 1 1 t h i s s p e c i s n o t r e l a t e d t o t h e p a r a m e t e r t r t x , w h i c h a l s o s p e c i f i e s l i m i t s o n s i g n a l s a p p l i e d t o i p 2 o r o t h e r i n p u t p i n s , f o r u s e a t t h e e x t e r n a l c l o c k s o u r c e f o r t r a n s m i t t e r a n d r e c e i v e r s . d t r t x - r x c a n d t x c ( e x t e r n a l ) h i g h o r l o w t i m e - v i a i p 2 , i p 3 , i p 4 a n d i p 5 t h i s s p e c p l a c e s a l o w e r l i m i t o n t h e a m o u n t o f t i m e t h a t a s i g n a l , b e i n g a p p l i e d a t t h e g e n e r a l p u r p o s e i n p u t p i n s , i p 2 - i p 5 , f o r u s e a s t h e t r a n s m i t t e r a n d r e c e i v e r c l o c k s o u r c e , c a n r e s i d e a t t h e h i g h o r l o w s t a t e . t h i s s p e c h a s n o r e l a t i o n s h i p t o t c t c , e v e n t h o u g h i t i s a l s o a p p l i e s t o i n p u t p i n i p 2 . d f r t x - r x c a n d t x c ( e x t e r n a l ) f r e q u e n c y - v i a i p 2 , i p 3 , i p 4 , a n d i p 5 t h i s s p e c p l a c e s l i m i t s o n b o t h t h e 1 x a n d 1 6 x e x t e r n a l s i g n a l s t h a t a r e t o b e u s e d t o c l o c k t h e t r a n s m i t t e r s a n d r e c e i v e r s . i f t h e u s e r w i s h e s t o u s e a 1 x c l o c k , h e / s h e c a n o n l y a p p l y a s i g n a l w i t h f r e q u e n c i e s u p t o 1 . 0 m h z . t h i s i n p u t w i l l r e s u l t s i n a b i t r a t e o f 1 m b p s ( s e e e x a m p l e c ) . i f t h e u s e r w i s h e s t o u s e a 1 6 x c l o c k , h e / s h e c a n o n l y a p p l y a s i g n a l w i t h f r e q u e n c i e s u p t o 2 . 0 m h z . s i n c e t h i s s i g n a l i s a 1 6 x s i g n a l , t h i s w i l l r e s u l t i n a b i t r a t e o f 1 2 5 k b p s . i n s u m m a r y , t h e d u a r t t i m i n g c o n t r o l b l o c k g i v e s t h e u s e r t h e a b i l i t y t o g e n e r a t e v i r t u a l l y a n y b a u d r a t e t h a t h e o r s h e d e s i r e s . t h e t i m i n g c o n t r o l b l o c k g i v e s t h e u s e r a c c e s s t o t h e f o l l o w i n g r e s o u r c e s : d 2 3 d i f f e r e n t s t a n d a r d b i t r a t e s v i a t h e b r g . d t h e c o u n t e r / t i m e r , w h i c h c a n b e c o n f i g u r e d t o g e n - e r a t e b i t r a t e s w h i c h a r e n o t a v a i l a b l e f r o m t h e b r g . d i n p u t s t o t h e t i m i n g c o n t r o l b l o c k ( v i a s o m e i n p u t p o r t p i n s ) w h i c h a l l o w s t h e u s e o f e x t e r n a l c l o c k s i g - n a l s t o g e n e r a t e a c u s t o m b i t r a t e . e . i n p u t p o r t t h e i n p u t p o r t c a n b e u s e d a s a g e n e r a l p u r p o s e i n p u t o r t h e d u a r t c a n b e p r o g r a m m e d t o u s e s o m e o f t h e s e i n p u t s f o r s p e c i a l f u n c t i o n s . t h e c u r r e n t s t a t e o f t h e i n p u t s t o t h i s u n l a t c h e d p o r t c a n b e r e a d b y t h e c p u b y r e a d i n g t h e i p r e g i s t e r ( f o r t h e s t a t e s o f i p 0 - i p 5 ) . a h i g h i n p u t s i g n a l a t t h e i p n p i n r e s u l t s i n a l o g i c ? 1 ? i n t h e i p r [ n ] b i t p o s i t i o n , w i t h i n t h e i p r e g i s t e r . l i k e w i s e , a ? l o w ? i n p u t s i g n a l a t t h e i p n p i n r e s u l t s i n a l o g i c ? 0 ? i n t h e i p r [ n ] b i t p o s i t i o n , w i t h i n t h e i p r e g i s t e r . e . 1 a l t e r n a t e f u n c t i o n s f o r t h e i n p u t p o r t t a b l e 1 7 d e s c r i b e s t h e a l t e r n a t e u s e s f o r t h e i n p u t p i n s , s u c h a s c l o c k i n p u t s a n d d a t a f l o w c o n t r o l s i g n a l s a n d i n c l u d e s a b r i e f s u m m a r y a s h o w t o p r o g r a m t h e a l t e r n a t e f u n c t i o n . a r e a d o f t h e i p r e g i s t e r s w i l l s h o w t h e l o g i c s t a t e a t t h e p i n , r e g a r d l e s s o f i t s p r o g r a m m e d f u n c t i o n .
x r 8 8 c 6 8 1 6 3 r e v . 2 . 1 1 i n p u t p o r t a l t e r n a t e f u n c t i o n ( s ) a p p r o a c h t o p r o g r a m a l t e r n a t e f u n c t i o n s i p 0 - c t s a : c l e a r t o s e n d ( c t s ) i n p u t f o r c h a n n e l a . n o t e : t h i s i n p u t i s a c t i v e l o w , f o r t h e c t s f u n c t i o n i p 0 c a n b e p r o g r a m m e d t o f u n c t i o n a s t h e - c t s a i n p u t b y s e t t i n g m r 2 a [ 4 ] = 1 . f o r a m o r e d e t a i l e d d i s c u s s i o n o n t h i s f u n c t i o n , p l e a s e s e e s e c t i o n g . 3 . i p 1 - c t s b : c l e a r t o s e n d ( c t s ) i n p u t f o r c h a n n e l b . n o t e : t h i s i n p u t i s a c t i v e l o w f o r t h e c t s f u n c t i o n i p 1 c a n b e p r o g r a m m e d t o f u n c t i o n a s t h e - c t s b i n p u t b y s e t t i n g m r 2 b [ 4 ] = 1 . f o r a m o r e d e t a i l e d d i s c u s s i o n o n t h i s f u n c t i o n , p l e a s e s e e s e c t i o n g . 3 . i p 2 c t _ e x : c o u n t e r / t i m e r e x t e r n a l c l o c k i n p u t . r x c b : e x t e r n a l c l o c k i n p u t f o r r e c e i v e r c h a n n e l b i p 2 c a n b e p r o g r a m m e d t o f u n c t i o n a s t h e e x t e r n a l c l o c k i n p u t f o r t h e c o u n t e r / t i m e r b y s e t t i n g a c r [ 6 : 4 ] = [ 0 , 0 , 0 ] . f o r a m o r e d e t a i l e d d i s c u s - s i o n i n t o t h e e f f e c t o f t h i s a c t i o n p l e a s e s e e s e c t i o n d . 2 i p 2 c a n a l s o b e p r o g r a m m e d t o f u n c t i o n a s t h e e x t e r n a l c l o c k i n p u t f o r t h e r e c e i v e r o f c h a n n e l b b y s e t t i n g c s r b [ 7 : 4 ] = [ 1 , 1 , 1 , 0 ] f o r t h e 1 6 x c l o c k , o r c s r b [ 7 : 4 ] = [ 1 , 1 , 1 , 1 ] f o r t h e 1 x c l o c k . i p 3 t x c a : e x t e r n a l c l o c k i n p u t f o r t r a n s m i t t e r c h a n n e l a i p 3 c a n b e p r o g r a m m e d t o f u n c t i o n a s t h e e x t e r n a l c l o c k i n p u t f o r t h e t r a n s m i t t e r o f c h a n n e l a b y s e t - t i n g c s r a [ 3 : 0 ] = [ 1 , 1 , 1 , 0 ] f o r t h e 1 6 x c l o c k , o r c s r a [ 3 : 0 ] = [ 1 , 1 , 1 , 1 ] f o r t h e 1 x c l o c k . i p 4 r x c a : e x t e r n a l c l o c k i n p u t f o r r e c e i v e r c h a n n e l a i p 4 c a n b e p r o g r a m m e d t o f u n c t i o n a s t h e e x t e r n a l c l o c k i n p u t f o r t h e r e c e i v e r o f c h a n n e l a b y s e t t i n g c s r a [ 7 : 4 ] = [ 1 , 1 , 1 , 0 ] f o r t h e 1 6 x c l o c k , o r c s r a [ 7 : 4 ] = [ 1 , 1 , 1 , 1 ] f o r t h e 1 x c l o c k . i p 5 t x c b : e x t e r n a l c l o c k i n p u t f o r t r a n s m i t t e r c h a n n e l b i p 5 c a n b e p r o g r a m m e d t o f u n c t i o n a s t h e e x t e r n a l c l o c k i n p u t f o r t h e t r a n s m i t t e r o f c h a n n e l b b y s e t - t i n g c s r b [ 3 : 0 ] = [ 1 , 1 , 1 , 0 ] f o r t h e 1 6 x c l o c k , o r c s r b [ 3 : 0 ] = [ 1 , 1 , 1 , 1 ] f o r t h e 1 x c l o c k . t a b l e 2 1 . l i s t i n g o f a l t e r n a t e f u n c t i o n f o r t h e i n p u t p o r t e . 2 i n p u t p o r t c o n f i g u r a t i o n r e g i s t e r s ( i p c r ) c h a n g e o f s t a t e d e t e c t o r s a r e p r o v i d e d f o r i n p u t p i n s i p 0 t h r o u g h i p 3 . t h e s e i n p u t s a r e s a m p l e d b y t h e 3 8 . 4 k h z o u t p u t o f t h e b r g ( 2 . 4 k b p s x 1 6 ) . a h i g h - t o - l o w o r l o w - t o - h i g h t r a n s i t i o n a t t h e s e i n p u t l a s t i n g a t l e a s t t w o c l o c k p e r i o d s ( a p p r o x i m a t e l y 5 0  s ) w i l l g u a r a n t e e t h a t t h e c o r r e s p o n d i n g b i t i n t h e i n p u t p o r t c h a n g e r e g i s t e r ( i p c r ) w i l l b e s e t , a l t h o u g h i t m a y b e s e t b y a c h a n g e o f s t a t e a s s h o r t a s 2 5  s . t h e b i t f o r m a t o f t h e i p c r f o l l o w s . t h e s t a t u s b i t s i n t h e i p c r ( i p c r [ 7 : 4 ] ) a r e c l e a r e d w h e n t h e r e g i s t e r i s r e a d b y t h e c p u . a n y c h a n g e o f s t a t e c a n a l s o b e p r o g r a m m e d t o g e n e r a t e a n i n t e r r u p t v i a t h e ? i n p u t p o r t c h a n g e o f s t a t e ? i n t e r r u p t . b i t 7 b i t 6 b i t 5 b i t 4 b i t 3 b i t 2 b i t 1 b i t 0 d e l t a i p 3 d e l t a i p 2 d e l t a i p 1 d e l t a i p 0 i p 3 i p 2 i p 1 i p 0 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = l o w 1 = h i g h 0 = l o w 1 = h i g h 0 = l o w 1 = h i g h 0 = l o w 1 = h i g h t a b l e 2 2 . i n p u t p o r t c o n f i g u r a t i o n r e g i s t e r - i p c r
x r 8 8 c 6 8 1 6 4 r e v . 2 . 1 1 i n o r d e r t o e n a b l e t h e ? i n p u t p o r t c h a n g e o f s t a t e ? i n t e r r u p t , o n e m u s t d o t h e f o l l o w i n g . d w r i t e t h e a p p r o p r i a t e d a t a t o t h e l o w e r n i b b l e o f a c r . t h e b i t f o r m a t s f o r a c r i s p r e s e n t e d i n t a b l e 2 3 . p l e a s e n o t e t h a t t h e a p p l i c a b l e b i t s , w i t h i n t h e a c r r e g i s t e r , a r e s h a d e d . b i t 7 b i t 6 b i t 5 b i t 4 b i t 3 b i t 2 b i t 1 b i t 0 b r g s e t s e l e c t c o u n t e r / t i m e r m o d e a n d s o u r c e d e l t a i p 3 i n t e r r u p t d e l t a i p 2 i n t e r r u p t d e l t a i p 1 i n t e r r u p t d e l t a i p 0 i n t e r r u p t 0 = s e t 1 1 = s e t 2 s e e t a b l e 7 0 = o f f 1 = o n 0 = o f f 1 = o n 0 = o f f 1 = o n 0 = o f f 1 = o n t a b l e 2 3 . a c r - a u x i l i a r y c o n t r o l r e g i s t e r d s e t t i n g i m r [ 7 ] . n o t e : t h i s ? t w o - t i e r e d ? i n t e r r u p t e n a b l i n g / d i s a b l i n g a p p r o a c h , f o r t h e ? i n p u t c h a n g e o f s t a t e ? i n t e r r u p t a l l o w s t r e m e n d o u s f l e x i b i l i t y f o r t h e u s e r . s e t t i n g o r c l e a r i n g t h e b i t s i n a c r [ 3 : 0 ] a l l o w s t h e u s e r t o s p e c i f y e x a c t l y w h i c h i n p u t p o r t p i n s t o b e e n a b l e d ( o r d i s a b l e d ) f o r g e n e r a t i n g t h e ? i n p u t p o r t c h a n g e o f s t a t e ? i n t e r r u p t . s e t t i n g o r c l e a r i n g i m r [ 7 ] a l l o w s t h e u s e r t o ? g l o b a l l y ? e n a b l e o r d i s a b l e t h i s i n t e r r u p t . t h e u p p e r n i b b l e o f t h e i p c r w i l l i n d i c a t e w h i c h o f t h e f o u r i n p u t p i n s e x p e r i e n c e d t h e ? c h a n g e o f s t a t e . ? t h e l o w e r n i b b l e o f t h e i p c r c o n t a i n s t h e p r e s e n t s t a t e o f t h e s e i n p u t p i n s . t h e r e f o r e , w h e n r e a d i n g t h e i p c r , i n r e s p o n s e t o t h e ? c h a n g e o f s t a t e ? i n t e r r u p t , t h e c p u w i l l d e t e r m i n e : d t h e i n p u t p i n ( s ) t h a t t o g g l e d . d t h e f i n a l s t a t e o f t h e c h a n g i n g i n p u t p i n . e . 3 2 8 p i n p a c k a g e d d u a r t s t h e 2 8 p i n p a c k a g e d d u a r t s c o m e w i t h o n l y o n e i n p u t p o r t p i n , i p 2 . t h e r e f o r e , t h e o n l y a l t e r n a t i v e f u n c t i o n s t h a t a r e a v a i l a b l e t o t h e d e v i c e ( v i a t h i s i n p u t p o r t p i n ) a r e c t _ e x ( c / t e x t e r n a l c l o c k i n p u t ) a n d r x c b ( e x t e r n a l c l o c k i n p u t f o r r e c e i v e r c h a n n e l b ) . f . o u t p u t p o r t t h e d u a r t c o n s i s t s o f a n 8 b i t p a r a l l e l o u t p u t p o r t . t h e o u t p u t p o r t c a n b e u s e d a s a g e n e r a l p u r p o s e o u t p u t o r c a n b e u s e d f o r o u t p u t t i m i n g a n d s t a t u s s i g n a l s b y a p p r o p r i a t e l y p r o g r a m m i n g o f t h e m o d e r e g i s t e r s ( m r 1 a , b a n d m r 2 a , b ) a n d a l s o t h e o u t p u t p o r t c o n f i g u r a t i o n r e g i s t e r , o p c r . w h e n u s e d t o o u t p u t s t a t u s s i g n a l s t h e o u t p u t p o r t p i n s a r e o p e n d r a i n , w h i c h a l l o w s t h e i r u s e i n a w i r e o r i n t e r r u p t s c h e m e . p r o g r a m m i n g t h e o u t p u t p o r t i s a l i t t l e d i f f e r e n t f r o m t h e c o n v e n t i o n a l w r i t e s t o a t y p i c a l p a r a l l e l p o r t o r t h e d a t a b u s . t h e o u t p u t p o r t c i r c u i t r y c o n s i s t s o f t h e o u t p u t p o r t r e g i s t e r ( o p r ) , a n d t h e o u t p u t p o r t p i n s t h e m s e l v e s . t h e c o n t e n t s o f t h e o p r a r e c o m p l e m e n t s o f t h e a c t u a l s t a t e o f t h e o u t p u t p o r t p i n s . f o r e x a m p l e : i f t h e b i t o p r [ 5 ] i s s e t t o a l o g i c ? 1 ? , t h i s w i l l r e s u l t i n t h e o p 5 p i n b e i n g a t a l o g i c ? 0 ? . l i k e w i s e , i f t h e b i t o p r [ 5 ] i s s e t t o a l o g i c ? 0 ? , t h i s r e s u l t s i n t h e o p 5 p i n b e i n g a t a l o g i c ? 1 ? . t h e o t h e r t h i n g t h a t m a k e s p r o g r a m m i n g t h e p a r a l l e l p o r t a l i t t l e o d d i s t h e p r o c e d u r e t h a t o n e m u s t u s e t o a c c o m p l i s h t h i s f e a t . w h e n w r i t i n g t o t h i s p a r a l l e l o u t p u t p o r t , o n e m u s t i n v o k e o n e o f t h e t w o a d d r e s s t r i g g e r e d c o m m a n d s : s e t o u t p u t p o r t b i t s a n d c l e a r o u t p u t p o r t b i t s . i t i s i m p o r t a n t t o n o t e t h a t w h e n i n v o k i n g t h e ? s e t o u t p u t p o r t b i t s ? c o m m a n d , t h e u s e r i s s e t t i n g t h e b i t s ( t o l o g i c ? 1 ? ) i n t h e o p r . h o w e v e r , t h i s a c t i o n r e s u l t s i n s e t t i n g t h e c o r r e s p o n d i n g o u t p u t p o r t p i n s t o l o g i c ? 0 ? ; d u e t o t h e c o m p l e m e n t a r y r e l a t i o n s h i p b e t w e e n t h e s t a t e o f t h e o u t p u t p o r t p i n s a n d t h e b i t s i n t h e o p r . l i k e w i s e , w h e n t h e c l e a r o u t p u t p o r t b i t s c o m m a n d i s i n v o k e d , t h e s p e c i f i e d b i t s , w i t h i n t h e o p r a r e ? c l e a r e d ? t o l o g i c ? 0 ? . h o w e v e r , t h e c o r r e s p o n d i n g o u t p u t p o r t p i n s a r e s e t t o t h e l o g i c ? 1 ? s t a t e . t h e s t a t e o f e a c h b i t w i t h i n t h e o p r , f o l l o w i n g a p o w e r - o n r e s e t ( p o r ) , i s a l l ? 0 ? . t h e r e f o r e , t h e s t a t e o f e a c h o u t p u t p o r t p i n , f o l l o w i n g a p o r i s l o g i c ? 1 ? . t h e b i t s o f t h e o p r c a n b e s e t a n d c l e a r e d i n d i v i d u a l l y . a b i t i s s e t b y t h e a d d r e s s - t r i g g e r e d ? s e t o u t p u t p o r t b i t s ? c o m m a n d ( s e e t a b l e 1 ) w i t h t h e a c c o m p a n y i n g
x r 8 8 c 6 8 1 6 5 r e v . 2 . 1 1 d a t a , a t t h e d a t a b u s , s p e c i f y i n g t h e b i t s , w i t h i n t h e o p r , t o b e s e t ( 1 = s e t , 0 = n o c h a n g e ) . a b i t i s c l e a r e d b y t h e a d d r e s s t r i g g e r e d ? c l e a r o u t p u t p o r t b i t s ? c o m m a n d ( s e e t a b l e 1 ) w i t h t h e a c c o m p a n y i n g d a t a , a t t h e d a t a b u s , s p e c i f y i n g t h e b i t s t o b e r e s e t ( 1 = c l e a r e d , 0 = n o c h a n g e ) . f . 1 w r i t i n g d a t a t o t h e o p r / o u t p u t p o r t p i n s a s m e n t i o n e d e a r l i e r , t h e s t a t e o f t h e o p r a n d c o n s e q u e n t l y , t h e o u t p u t p o r t p i n s i s c o n t r o l l e d b y t w o ? a d d r e s s t r i g g e r e d ? c o m m a n d s . d s e t o u t p u t p o r t b i t s c o m m a n d d c l e a r o u t p u t p o r t b i t s c o m m a n d t h e p r o c e d u r e a n d e f f e c t o f u s i n g t h e s e c o m m a n d s a r e d i s c u s s e d i n s e c t i o n f . 1 . 1 . f . 1 . 1 s e t o u p u t p o r t b i t s c o m m a n d t h e a c t u a l p r o c e d u r e u s e d t o i n v o k e t h e ? s e t o u t p u t p o r t b i t s ? c o m m a n d i s t h e s a m e a s w r i t i n g t h e c o n t e n t s o n t h e d a t a b u s ( d 7 - d 0 ) t o d u a r t a d d r e s s 0 e 1 6 f o r ( o p 7 - o p 0 ) . f o r e v e r y ? 1 ? t h a t e x i s t s w i t h i n t h e l a t c h e d c o n t e n t s o f t h e d a t a b u s , t h e c o r r e s p o n d i n g b i t , w i t h i n t h e o p r i s s e t t o a l o g i c ? h i g h ? . f o r e v e r y ? 0 ? t h a t i s p r e s e n t o n t h e d a t a b u s a n d i s w r i t t e n t o d u a r t a d d r e s s 0 e 1 6 , t h e s t a t e o f t h e c o r r e s p o n d i n g b i t , w i t h i n t h e o p r i s u n c h a n g e d . w e c o u l d s t a t e t h i s a n o t h e r w a y a s : f o r e v e r y ? 1 ? t h a t i s p r e s e n t o n t h e d a t a b u s , d u r i n g t h e u s e o f t h e ? s e t o u t p u t p o r t b i t s ? c o m m a n d , t h e c o r r e s p o n d i n g o u t p u t p o r t p i n i s s e t t o a l o g i c ? l o w ? . a n d f o r e v e r y ? 0 ? t h a t i s p r e s e n t o n t h e d a t a b u s , d u r i n g t h i s c o m m a n d , t h e s t a t e o f t h e c o r r e s p o n d i n g o u t p u t p o r t p i n i s u n c h a n g e d . f o r e x a m p l e : s u p p o s e t h a t t h e c o n t e n t o f t h e o p r a r e o p r [ 7 : 0 ] = [ 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 ] . h e n c e , t h e s t a t e o f t h e o u t p u t p o r t p i n s a r e a s f o l l o w s : [ o p 7 , o p 6 , o p 5 , o p 4 , o p 3 , o p 2 , o p 1 , o p 0 ] = [ 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 ] i f w e w r i t e t h e f o l l o w i n g t o d u a r t a d d r e s s 0 e 1 6 ; [ d 7 , . . . , d 0 ] = [ 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 ] ; t h e r e s u l t i n g s t a t e o f t h e o u t p u t p o r t r e g i s t e r b i t s f o l l o w s : o p r [ 7 : 0 ] = [ 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ] . c o n s e q u e n t l y , t h e s t a t e o f t h e o u t p u t p o r t p i n s a r e a s f o l l o w s : [ o p 7 , o p 6 , o p 5 , o p 4 , o p 3 , o p 2 , o p 1 , o p 0 ] = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ] t h i s e x a m p l e o f t h e ? s e t o u t p u t p o r t b i t s ? c o m m a n d i s i l l u s t r a t e d i n f i g u r e 3 3 . s t a t e o f o u t p u t p o r t p i n s ( o p 7 - o p 0 ) i n i t i a l o p r [ 7 : 0 ] f i n a l o p r [ 7 : 0 ] d a t a b u s , d 7 - d 0 f i g u r e 3 3 . i l l u s t r a t i o n o f t h e ? s e t o u t p u t p o r t b i t ? c o m m a n d a n d i t s e f f e c t o n t h e o u t p u t p o r t r e g i s t e r a n d t h e s t a t e o f t h e o u t p u t p o r t p i n s . d u a r t a d d r e s s 0 e h 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
x r 8 8 c 6 8 1 6 6 r e v . 2 . 1 1 i n s u m m a r y , f o r t h e ? s e t o u t p u t p o r t b i t s ? c o m m a n d ; d n = 0 ; r e s u l t s i n n o c h a n g e f o r o p r [ n ] , n o r o u t p u t p o r t p i n o p n . d n = 1 ; r e s u l t s i n o p r [ n ] = ? 1 ? , a n d o u t p u t p o r t p i n , o p n = ? 0 ? f . 1 . 2 c l e a r o u t p u t p o r t b i t s c o m m a n d t h e p r o c e d u r e f o r i n v o k i n g t h i s c o m m a n d i s v e r y s i m i l a r t o t h a t f o r ? s e t o u t p u t p o r t b i t s c o m m a n d ? ; e x c e p t i n t h a t t h e u s e r n o w w r i t e s t o d u a r t a d d r e s s 0 f 1 6 f o r [ o p 7 , . . . , o p 0 ] . f o r e v e r y ? 1 ? t h a t i s ? w r i t t e n ? t o t h i s a d d r e s s , t h e c o r r e s p o n d i n g b i t i n t h e o p r r e g i s t e r i s s e t t o a l o g i c ? l o w ? a n d t h e c o r r e s p o n d i n g o u t p u t p o r t p i n , o p n i s s e t t o a l o g i c ? h i g h ? . f o r e v e r y ? 0 ? t h a t i s w r i t t e n t o t h i s a d d r e s s , t h e s t a t e o f t h e c o r r e s p o n d i n g o p r r e g i s t e r b i t , a n d i n t u r n t h e s t a t e o f t h e o u t p u t p o r t p i n i s u n c h a n g e d . f o r e x a m p l e : s u p p o s e t h a t t h e c o n t e n t s o f t h e o u t p u t p o r t r e g i s t e r , o p r = [ 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ] . c o n s e q u e n t l y , t h e s t a t e o f t h e o u t p u t p o r t p i n s a r e : [ o p 7 , o p 6 , o p 5 , o p 4 , o p 3 , o p 2 , o p 1 , o p 0 ] = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ] i f w e w e r e t o w r i t e [ d 7 , . . . , d 0 ] = [ 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 ] t o d u a r t a d d r e s s 0 f 1 6 , t h e r e s u l t i n g c o n t e n t s o f t h e o u t p u t p o r t r e g i s t e r w i l l b e : o p r [ 7 : 0 ] = [ 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 ] f u r t h e r , t h e r e s u l t i n g s t a t e o f t h e o u t p u t p o r t p i n s w i l l b e : [ o p 7 , o p 6 , o p 5 , o p 4 , o p 3 , o p 2 , o p 1 , o p 0 ] = [ 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 ] t h i s e x a m p l e o f t h e ? s e t o u t p u t p o r t b i t s ? c o m m a n d i s i l l u s t r a t e d i n f i g u r e 3 4 . f i n a l o p r [ 7 : 0 ] d a t a b u s , d 7 - d 0 d u a r t a d d r e s s 0 f h f i g u r e 3 4 . i l l u s t r a t i o n o f t h e ? c l e a r o u t p u t p o r t b i t ? c o m m a n d a n d i t s e f f e c t o n t h e o u t p u t p o r t r e g i s t e r a n d t h e s t a t e o f t h e o u t p u t p o r t p i n s . s t a t e o f t h e o u t p u t p o r t p i n s ( o p 7 - o p 0 ) i n i t i a l o p r [ 7 : 0 ] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 i n s u m m a r y , f o r t h e ? c l e a r o u t p u t p o r t b i t s ? c o m m a n d ; d n = 0 , r e s u l t s i n n o c h a n g e f o r o p r [ n ] a n d n o c h a n g e i n t h e s t a t e o f t h e o u t p u t p o r t p i n , o p n . d n = 1 , r e s u l t s i n o p r [ n ] = 0 , a n d s e t s t h e c o r r e s p o n d i n g o u t p u t p o r t p i n t o a l o g i c ? 1 ? .
x r 8 8 c 6 8 1 6 7 r e v . 2 . 1 1 f . 2 o u t p u t p o r t c o n f i g u r a t i o n r e g i s t e r ( o p c r ) t h e o u t p u t p o r t p i n s c a n b e u s e d a s g e n e r a l p u r p o s e o u t p u t p i n s , o r t h e y c a n b e c o n f i g u r e d t o u s e d i n a l t e r n a t e f u n c t i o n s . t a b l e 2 4 l i s t s t h e a l t e r n a t e f u n c t i o n s o f e a c h o f t h e o u t p u t p o r t p i n s . o u t p u t p o r t a l t e r n a t e f u n c t i o n ( s ) o p 0 - r t s a : r e q u e s t - t o - s e n d ( r t s ) o u t p u t f o r c h a n n e l a . n o t e : t h i s o u t p u t i s a c t i v e l o w f o r t h e r t s f u n c t i o n . o p 1 - r t s b : r e q u e s t - t o - s e n d ( r t s ) o u t p u t f o r c h a n n e l b . n o t e : t h i s o u t p u t i s a c t i v e l o w f o r t h e r t s f u n c t i o n . o p 2 t x c a _ 1 6 x o u t p u t : c h a n n e l a 1 6 x t r a n s m i t t e r c l o c k o u t p u t . t x c a _ 1 x o u t p u t : c h a n n e l a 1 x t r a n s m i t t e r c l o c k o u t p u t . r x c a _ 1 x o u t p u t : c h a n n e l a 1 x r e c e i v e r c l o c k o u t p u t . o p 3 t x c b _ 1 x o u t p u t : c h a n n e l b 1 x t r a n s m i t t e r c l o c k o u t p u t . r x c b _ 1 x o u t p u t : c h a n n e l b 1 x r e c e i v e r c l o c k o u t p u t . c / t _ r d y : t h e c o u n t e r / t i m e r r e a d y o u t p u t f o r c / t # 1 . n o t e : t h i s o u t p u t i s a n o p e n - d r a i n o u t p u t w h e n u s e d a s t h e c o u n t e r / t i m e r r e a d y o u t p u t . o p 4 r x r d y / f f u l l _ a o u t p u t : c h a n n e l a r e c e i v e r r e a d y / f i f o f u l l i n d i c a t o r . n o t e : t h i s i s a n o p e n - d r a i n o u t p u t f o r t h e r x r d y / f f u l l _ a f u n c t i o n . o p 5 r x r d y / f f u l l _ b o u t p u t : c h a n n e l b r e c e i v e r r e a d y / f i f o f u l l i n d i c a t o r . n o t e : t h i s i s a n o p e n - d r a i n o u t p u t f o r t h e r x r d y / f f u l l _ b f u n c t i o n . o p 6 t x r d y _ a o u t p u t : c h a n n e l a t r a n s m i t t e r r e a d y i n d i c a t o r . t h i s i s a n o p e n - d r a i n o u t p u t f o r t h e t x r d y _ a f u n c t i o n . o p 7 t x r d y _ b o u t p u t : c h a n n e l b t r a n s m i t t e r r e a d y i n d i c a t o r . t h i s i s a n o p e n - d r a i n o u t p u t f o r t h e t x r d y _ b f u n c t i o n . t a b l e 2 4 . l i s t i n g o f t h e a l t e r n a t e f u n c t i o n s f o r t h e o u t p u t p o r t m a n y o f t h e a l t e r n a t e f u n c t i o n s o f t h e v a r i o u s o u t p u t p o r t p i n s a r e s e l e c t e d b y w r i t i n g t h e a p p r o p r i a t e d a t a t o t h e o p c r . t h e b i t f o r m a t o f t h i s r e g i s t e r f o l l o w s b i t 7 b i t 6 b i t 5 b i t 4 b i t 3 b i t 2 b i t 1 b i t 0 o p 7 o p 6 o p 5 o p 4 o p 3 o p 2 0 = o p r [ 7 ] 1 = t x r d y b 0 = o p r [ 6 ] 1 = t x r d y a 0 = o p r [ 5 ] 1 = r x r d y / f f u l l b 0 = o p r [ 4 ] 1 = r x r d y / f f u l l a 0 0 = o p r [ 3 ] 0 1 = c / t # 1 o u t p u t 1 0 = t x c b ( 1 x ) 1 1 = r x c b ( 1 x ) 0 0 = o p r [ 2 ] 0 1 = t x c a ( 1 6 x ) 1 0 = t x c a ( 1 x ) 1 1 = r x c a ( 1 x ) n o t e : o p c r o n l y a d d r e s s e s t h e a l t e r n a t e f u n c t i o n s f o r o u t p u t p o r t p i n s , o p 7 - o p 2 . o p 0 a n d o p 1 a s s u m e t h e i r r t s r o l e s i f e i t h e r m r 1 n [ 7 ] = 1 o r m r 2 n [ 5 ] = 1 . s e t t i n g t h o s e m o d e r e g i s t e r b i t s e n a b l e s t h e r t s f u n c t i o n . o t h e r w i s e , t h e s e t w o p o r t s w i l l o n l y b e g e n e r a l p u r p o s e o u t p u t p o r t s . t a b l e 2 5 . o u t p u t p o r t c o n f i g u r a t i o n r e g i s t e r - o p c r
x r 8 8 c 6 8 1 6 8 r e v . 2 . 1 1 f . 3 2 8 p i n d i p p a c k a g e d d u a r t s t h e 2 8 p i n d i p p a c k a g e d d e v i c e s h a v e o n l y t w o o u t p u t p o r t s , o p 0 a n d o p 1 . h e n c e t h e e f f e c t o f t h e ? s e t o u t p u t p o r t b i t s ? a n d ? c l e a r o u t p u t p o r t b i t s ? c o m m a n d s o n l y e f f e c t s t h e s e t w o p i n s . a d d i t i o n a l l y - r t s a a n d - r t s b a r e t h e o n l y a l t e r n a t i v e o u t p u t p o r t p i n f u n c t i o n s a v a i l a b l e t o t h i s v e r s i o n o f t h e x r 8 8 c 6 8 1 . g . s e r i a l c h a n n e l s a a n d b e a c h s e r i a l c h a n n e l o f t h e d u a r t c o m p r i s e s a f u l l - d u p l e x a s y n c h r o n o u s r e c e i v e r a n d t r a n s m i t t e r . t h e t w o c h a n n e l s c a n i n d e p e n d e n t l y s e l e c t t h e i r o p e r a t i n g f r e q u e n c y ( f r o m t h e b r g , t h e c / t , o r a n e x t e r n a l c l o c k ) a s w e l l a s o p e r a t i n g m o d e . b e s i d e s t h e n o r m a l m o d e i n w h i c h t h e r e c e i v e r a n d t r a n s m i t t e r o f e a c h c h a n n e l o p e r a t e i n d e p e n d e n t l y , t h e d u a r t c a n b e c o n f i g u r e d t o o p e r a t e i n v a r i o u s l o o p i n g m o d e s , w h i c h a r e u s e f u l f o r l o c a l a n d r e m o t e d i a g n o s t i c s , a s w e l l a s i n a w a k e u p m o d e u s e d f o r m u l t i - d r o p a p p l i c a t i o n s . i n t h i s s e c t i o n c e r t a i n s y m b o l s w i l l b e u s e d t o d e n o t e c e r t a i n a s p e c t s o f t h e t r a n s m i t t e r a n d r e c e i v e r . t h e d e f i n i t i o n o f s o m e o f t h e s e s y m b o l s f o l l o w s . t x d n - t r a n s m i t t e r ( s e r i a l ) d a t a o u t p u t f o r c h a n n e l n t x c n - t r a n s m i t t e r c l o c k s i g n a l f o r c h a n n e l n r x d n - r e c e i v e r ( s e r i a l ) d a t a i n p u t f o r c h a n n e l n r x c n - r e c e i v e r c l o c k s i g n a l f o r c h a n n e l n t h i s s e c t i o n o f t h e d a t a s h e e t d i s c u s s e s t h e r e s o u r c e s t h a t a r e a v a i l a b l e t o e a c h c h a n n e l . t h e s e r e s o u r c e s a r e l i s t e d h e r e : d t r a n s m i t t e r ( t r a n s m i t h o l d i n g r e g i s t e r a n d t r a n s m i t s h i f t r e g i s t e r ) d r e c e i v e r ( r e c e i v e h o l d i n g r e g i s t e r a n d r e c e i v e s h i f t r e g i s t e r ) d s t a t u s r e g i s t e r d m o d e r e g i s t e r s d c o m m a n d r e g i s t e r ( s e e s e c t i o n b . 2 , c o m m a n d d e c o d i n g ) d c l o c k s e l e c t r e g i s t e r ( s e e s e c t i o n d , t i m i n g c o n t r o l b l o c k ) g . 1 t r a n s m i t t e r ( t s r a n d t h r ) t h e t r a n s m i t t e r a c c e p t s p a r a l l e l d a t a f r o m t h e c p u a n d c o n v e r t s i t t o a s e r i a l b i t s t r e a m w h e r e i t i s o u t p u t a t t h e t x d n p i n , a d d i n g s t a r t , s t o p a n d o p t i o n a l p a r i t y b i t s a s r e q u i r e d b y t h e a s y n c h r o n o u s p r o t o c o l . e a c h t r a n s m i t t e r c o n s i s t s o f a t r a n s m i t s h i f t r e g i s t e r ( t s r ) a n d a t r a n s m i t h o l d i n g r e g i s t e r ( t h r ) . t h e t h r i s a c t u a l l y a 1 b y t e f i f o . f i g u r e 3 5 p r e s e n t s a s i m p l i f i e d i l l u s t r a t i o n o f t h e t s r a n d t h r . t h e c p u i n i t i a t e s t h e t r a n s m i s s i o n o f s e r i a l d a t a b y w r i t i n g c h a r a c t e r d a t a t o t h e t h r . t h e c h a r a c t e r w i l l b e l o a d e d i n t o a n d p r o c e s s e d t h r o u g h t h e f i f o , u n t i l i t r e a c h e s t h e t s r . d u r i n g t h e t r a n s i t i o n f r o m t h e t h r t o t h e t s r , t h e c h a r a c t e r d a t a i s s e r i a l i z e d a n d i s t r a n s m i t t e d o u t o f t h e c h i p v i a t h e t x d n p i n . t x d n o u t g o i n g s e r i a l d a t a t r a n s m i t h o l d i n g r e g i s t e r t r a n s m i t s h i f t r e g i s t e r t x c n t r a n s m i t t e r c l o c k ( f r o m t i m i n g b l o c k ) f r o m d a t a b u s . p a r a l l e l d a t a f r o m t h e c p u f i g u r e 3 5 . a s i m p l i f i e d d r a w i n g d e p i c t i n g t h e t r a n s m i t s h i f t r e g i s t e r a n d t h e t r a n s m i t h o l d i n g r e g i s t e r .
x r 8 8 c 6 8 1 6 9 r e v . 2 . 1 1 w h e n e v e r a t r a n s m i t t e r i s i d l e o r i n a c t i v e , t h e t x d n o u t p u t f o r t h a t p a r t i c u l a r c h a n n e l w i l l b e c o n t i n u o u s l y m a r k i n g ( a t a l o g i c ? h i g h ? ) . h o w e v e r , j u s t p r i o r t o t h e t r a n s m i s s i o n o f a c h a r a c t e r , t h e t r a n s m i t t e r a l e r t s t h e r e c e i v e r b y g e n e r a t i n g a ? s t a r t ? b i t . t h e s t a r t b i t i s b a s i c a l l y t h e t x d n o u t p u t t o g g l i n g ? l o w ? f o r o n e b i t p e r i o d , f o l l o w i n g a n i d l e p e r i o d o r t h e s t o p b i t o f t h e p r e c e d i n g c h a r a c t e r . i m m e d i a t e l y a f t e r t r a n s m i s s i o n o f t h e s t a r t b i t , t h e l e a s t s i g n i f i c a n t b i t o f t h e c h a r a c t e r w i l l b e s e n t f i r s t , f o l l o w e d b y p r o g r e s s i v e l y m o r e s i g n i f i c a n t b i t s . i f t h e c o m m u n i c a t i o n p r o t o c o l c a l l s f o r i t , t h e t r a n s m i t t e r w i l l s e n d a ? p a r i t y ? b i t b e t w e e n t h e m o s t s i g n i f i c a n t b i t o f t h e c h a r a c t e r a n d t h e s t o p b i t . f i g u r e 3 6 p r e s e n t s t h e w a v e f o r m ( f o r m a t ) o f t h e t r a n s m i t t e r ( t x d n ) o u t p u t . i n t h i s c a s e , t h e t r a n s m i t t e r i s s e n d 5 d 1 6 , w i t h 8 - n - 1 p r o t o c o l ( 8 b i t s p e r c h a r a c t e r , n o - p a r i t y , 1 - s t o p b i t ) . f i g u r e 3 6 . t h e o u t p u t w a v e f o r m o f t h e t r a n s m i t t e r w h i l e s e n d i n g 5 d 1 6 ( 8 - n - 1 p r o t o c o l ) . s t a r t b i t s t o p b i t t r a n s m i t t e r i d l e o r s t o p b i t t x d n 1 1 1 1 1 0 0 0 t h e d u a r t c a n b e p r o g r a m m e d t o g e n e r a t e a n i n t e r r u p t r e q u e s t t o t h e c p u b y s e t t i n g i m r [ 0 ] a n d i m r [ 4 ] f o r c h a n n e l s a , a n d b , r e s p e c t i v e l y . i n t h i s c a s e , t h e d u a r t w o u l d g e n e r a t e a n i n t e r r u p t r e q u e s t a n y t i m e a t r a n s m i t t e r t h r a n d t s r a r e e m p t y o f c h a r a c t e r s . t h e c p u c a n s e r v i c e t h i s i n t e r r u p t r e q u e s t b y w r i t i n g a c h a r a c t e r t o t h e e m p t y t h r . t h e t r a n s m i t t e r c a n b e e n a b l e d o r d i s a b l e d v i a t h e c o m m a n d r e g i s t e r ( s e e s e c t i o n b . 2 ) . i f t h e c o m m a n d i s i s s u e d t o d i s a b l e t h e t r a n s m i t t e r , w h i l e t h e r e a r e s t i l l c h a r a c t e r s i n t h e t h r a n d t s r , t h e t r a n s m i t t e r w i l l c o n t i n u e t r a n s m i t t i n g a l l o f t h e r e m a i n i n g d a t a w i t h i n t h e t h r a n d t s r , u n t i l t h e y a r e c o m p l e t e l y e m p t y o f c h a r a c t e r s . n o n e w c h a r a c t e r s c a n b e w r i t t e n t o t h e t h r o n c e t h e d i s a b l e t r a n s m i t t e r c o m m a n d h a s b e e n i s s u e d . g . 2 r e c e i v e r ( r s r a n d r h r t h e f u n c t i o n o f t h e s e r i a l r e c e i v e r i s t o r e c e i v e r s e r i a l d a t a a t t h e r x d n i n p u t ; c o n v e r t i t t o p a r a l l e l d a t a , w h e r e i t c a n b e r e a d b y t h e c p u . t h e r e c e i v e r i s a l s o r e s p o n s i b l e f o r c o m p u t i n g a n d c h e c k i n g p a r i t y , i f p a r i t y i s b e i n g u s e d . t h e r e c e i v e r c o n s i s t s o f t h e r e c e i v e s h i f t r e g i s t e r ( r s r ) a n d a r e c e i v e h o l d i n g r e g i s t e r ( r h r ) . t h e r h r i s , i n e s s e n c e , a t h r e e b y t e f i f o . t h e r e c e i v e r r e c e i v e s d a t a a t t h e r x d n p i n , w h e r e i t i s p r o c e s s e d t h r o u g h t h e r s r . a f t e r w a r d s , t h e d a t a i s c o n v e r t e d t o p a r a l l e l f o r m a t , a n d i s t r a n s f e r r e d t o t h e r h r . t h i s c h a r a c t e r i s t h e n p r o c e s s e d t h r o u g h t h e 3 b y t e s o f f i f o . o n c e t h e r e c e i v e d c h a r a c t e r r e a c h e s t h e t o p o f t h e f i f o , i t c a n b e ? p o p p e d ? o r r e a d b y t h e c p u ; w h e n i t r e a d s t h e r h r . f i g u r e 3 7 d e p i c t s a s i m p l i f i e d d r a w i n g o f t h e r e c e i v e r .
x r 8 8 c 6 8 1 7 0 r e v . 2 . 1 1 r e c e i v e s h i f t r e g i s t e r r x d n i n c o m i n g s e r i a l d a t a r e c e i v e h o l d i n g r e g i s t e r r x c n r e c e i v e r c l o c k ( f r o m t i m i n g b l o c k ) t o d a t a b u s t o b e r e a d b y t h e c p u f i g u r e 3 7 . a s i m p l i f i e d d r a w i n g o f t h e r e c e i v e r s h i f t r e g i s t e r a n d r e c e i v e r h o l d i n g r e g i s t e r t h e r e c e i v e r f u n c t i o n s b y s e n s i n g t h e v o l t a g e l e v e l a t t h e r x d n i n p u t . w h e n t h e f a r - e n d t r a n s m i t t e r i s i d l e , i t s t x d n o u t p u t ( a n d c o n s e q u e n t l y , t h e r x d n i n p u t ) i s c o n t i n u o u s l y ? m a r k i n g ? . d u r i n g t h i s p e r i o d t h e r e c e i v e r i s i n a c t i v e a n d i s n o t r e c e i v i n g o r p r o c e s s i n g a n y d a t a . h o w e v e r , w h e n t h e f a r - e n d t r a n s m i t t e r s e n d s t h e s t a r t b i t , ( w i t h i t s t x d n o u t p u t t o g g l i n g ? l o w ? ) , a r e c e i v e r c l o c k , w h i c h i s 1 6 t i m e s t h e b a u d r a t e ( w i t h t h e 1 6 x c l o c k ) , w i l l s t a r t s a m p l i n g t h i s s t a r t b i t . i f t h e r e c e i v e r d e t e r m i n e s t h a t i t s r x d n i n p u t i s s t i l l ? l o w ? a f t e r i t s 7 t h s a m p l e , t h e n t h e r e c e i v e r h a r d w a r e c o n s i d e r s t h i s s i g n a l t o b e a v a l i d s t a r t b i t . i f t h e r x d n i n p u t i s n o t ? l o w ? a t t h e 7 t h s a m p l e , t h e r e c e i v e r w i l l i g n o r e t h i s d o w n w a r d p u l s e a s ? n o i s e ? . f r o m t h i s 7 t h s a m p l e o n , t h e r e c e i v e r w i l l s a m p l e e a c h s u c c e s s i v e b i t a t o n e b i t - p e r i o d i n t e r v a l s ( 1 / b a u d r a t e ) w i t h t h e 1 x c l o c k . t h e p u r p o s e o f t h i s 1 6 x c l o c k i s t h e n t w o - f o l d . 1 . t o v e r i f y t h a t t h e d e t e c t e d ? l o w ? l e v e l i n t h e r x d n i n p u t i s i n d e e d a s t a r t b i t . 2 . t o e s t a b l i s h t h e p h a s e r e l a t i o n s h i p b e t w e e n t h e 1 x b i t s a m p l i n g c l o c k , a n d t h e i n c o m i n g s e r i a l d a t a s t r e a m . t h e i d e a i s t o s a m p l e e a c h d a t a b i t i n t h e m i d d l e o f i t s b i t p e r i o d . p l e a s e n o t e t h a t i f a 1 6 x c l o c k i s s e l e c t e d f o r t h e r e c e i v e r , t h i s o v e r - s a m p l i n g p r o c e d u r e o c c u r s w i t h e a c h a n d e v e r y s t a r t b i t . t h e r e c e i v e r w i l l c o n t i n u e t o s a m p l e ( a n d r e c e i v e ) e a c h b i t o f t h e c h a r a c t e r t h a t f o l l o w s t h e s t a r t b i t , a t o n e - b i t t i m e i n t e r v a l s . u p o n r e c e p t i o n o f t h e c h a r a c t e r ? s m s b t h e r e c e i v e r w i l l c h e c k p a r i t y ( i f p r o g r a m m e d ) o r w i l l s a m p l e f o r t h e s t o p b i t . i f t h e r e c e i v e r s a m p l e s a m a r k c o n d i t i o n a t t h i s t i m e a n d t h e p a r i t y c h e c k ( i f a n y ) w a s v a l i d ; a s u c c e s s f u l r e c e p t i o n o f t h e c h a r a c t e r i s p r e s u m e d ; a n d t h e r e c e i v e r w i l l p r e p a r e t o s e n s e a n d o v e r s a m p l e t h e o c c u r r e n c e o f t h e s t a r t b i t f o r t h e n e x t c h a r a c t e r .
x r 8 8 c 6 8 1 7 1 r e v . 2 . 1 1 r e c e i v e r e r r o r s i f t h e r e c e i v e r d o e s n o t s a m p l e a ? m a r k ? , a t t h e p r e s u m e d t i m e o f t h e s t o p b i t , a f r a m i n g e r r o r ( f e ) i s f l a g g e d b y s e t t i n g , s r n [ 6 ] = 1 . i f , u p o n c o m p l e t e r e c e p t i o n o f t h e c h a r a c t e r , t h e s u b s e q u e n t p a r i t y c h e c k i s i n c o r r e c t , a p a r i t y e r r o r ( p e ) i s f l a g g e d b y s e t t i n g s r n [ 5 ] = 1 . i f t h e r h r w a s f u l l , a n d a n o t h e r c h a r a c t e r e x i s t e d i n t h e r s r ; a n d i f m o r e d a t a e n t e r s t h e d u a r t v i a t h e c o r r e s p o n d i n g r x d n p i n ; t h e n t h e c h a r a c t e r i n t h e r s r w i l l b e o v e r w r i t t e n , a n d a r e c e i v e r o v e r r u n e r r o r ( o e ) c o n d i t i o n w i l l b e f l a g g e d i n t h e s t a t u s r e g i s t e r ( s r n [ 4 ] = 1 ) . t h i s p h e n o m e n o n o b v i o u s l y r e s u l t s i n a l o s s o f d a t a . f i n a l l y i f t h e r x d n i n p u t i s h e l d a t t h e s p a c e c o n d i t i o n f o r a n e n t i r e c h a r a c t e r p e r i o d , a n d n o s t o p b i t w a s d e t e c t e d ( s t o p b i t s a m p l i n g r e s u l t e d i n a s p a c e ) ; a r e c e i v e d b r e a k ( r b ) c o n d i t i o n i s p r e s u m e d . w h e n t h i s c o n d i t i o n i s d e t e c t e d s e v e r a l t h i n g s h a p p e n . 1 . t h e ? r e c e i v e d b r e a k ? c o n d i t i o n i s f l a g g e d i n t h e s t a t u s r e g i s t e r ( s r n [ 7 ] = 1 ) . 2 . t h e ? b r e a k ? c h a r a c t e r i s l o a d e d i n t o t h e r h r . h o w e v e r , n o f u r t h e r d a t a i s r e c e i v e d o r l o a d e d i n t o t h e r h r u n t i l t h e r x d n i n p u t r e t u r n s t o t h e ? m a r k ? c o n d i t i o n . 3 . t h e c o r r e s p o n d i n g ? d e l t a b r e a k ? i n t e r r u p t i s r e q u e s t e d ( i f p r o g r a m m e d ) a n d f l a g g e d i n t h e i n t e r r u p t s t a t u s r e g i s t e r . o n c e t h e r x d n i n p u t r e t u r n s t o t h e ? m a r k ? c o n d i t i o n , s u b s e q u e n t c h a r a c t e r s w i l l b e l o a d e d i n t o t h e r h r , a n d t h e c o r r e s p o n d i n g ? d e l t a b r e a k ? i n t e r r u p t c o n d i t i o n w i l l o n c e a g a i n b e r e q u e s t e d ( i f p r o g r a m m e d ) a n d f l a g g e d i n t h e i n t e r r u p t s t a t u s r e g i s t e r . t h e d u a r t c a n b e p r o g r a m m e d t o g e n e r a t e a n i n t e r r u p t r e q u e s t t o t h e c p u i f a r x r d y ( r e c e i v e r r e a d y ) o r a f f u l l ( f i f o f u l l ) c o n d i t i o n e x i s t s f o r e i t h e r c h a n n e l . a r x r d y c o n d i t i o n e x i s t s w h e n a t l e a s t o n e c h a r a c t e r o f d a t a e x i s t s w i t h i n t h e r h r , a n d i s u l t i m a t e l y w a i t i n g t o b e ? p o p p e d ? a n d r e a d b y t h e c p u . t h e f f u l l c o n d i t i o n e x i s t s w h e n t h e r h r i s c o m p l e t e l y f u l l a n d c a n n o t a c c e p t a n y n e w c h a r a c t e r s f r o m t h e r s r u n t i l t h e c p u h a s r e a d o r ? p o p p e d ? t h e f i f o . t h e u s e r c a n s e l e c t t h e i n t e r r u p t r e q u e s t t o o c c u r d u e t o e i t h e r ( b u t n o t b o t h ) t h e r x r d y o r f f u l l c o n d i t i o n v i a t h e c h a n n e l m o d e r e g i s t e r s . t h e s e i n t e r r u p t s a r e e n a b l e d b y s e t t i n g i m r [ 1 ] a n d i m r [ 5 ] f o r c h a n n e l s a a n d b , r e s p e c t i v e l y . e a c h c h a n n e l i s e q u i p p e d w i t h n u m e r o u s o t h e r r e g i s t e r s t h a t a r e u s e d t o p r o v i d e c o n t r o l a n d m o n i t o r i n g o f t h e s e c h a n n e l s . s o m e o f t h e s e r e g i s t e r s w e r e d i s c u s s e d i n e a r l i e r s e c t i o n s o f t h e d a t a s h e e t . h o w e v e r , a d e t a i l e d d i s c u s s i o n o f t h e r e m a i n d e r o f t h e s e r e g i s t e r s a r e p r e s e n t e d i n s e c t i o n g . 3 . g . 3 m o d e r e g i s t e r s , m r 1 n a n d m r 2 n t h e m o d e r e g i s t e r s , a l l o w t h e u s e r t o s p e c i f y o f t h e p r o t o c o l p a r a m e t e r s t h a t h e / s h e w i s h t h e c h a n n e l t o r u n a t . t h e s e r e g i s t e r s a l s o a l l o w t h e u s e r t o c o n f i g u r e t h e d u a r t c h a n n e l s t o e n g a g e i n m o d e m h a n d s h a k i n g t e c h n i q u e s . t h e b i t s o f e a c h o f t h e s e r e g i s t e r s a r e d i s c u s s e d i n t a b l e 2 6 . b i t 7 b i t 6 b i t 5 b i t 4 b i t 3 b i t 2 b i t 1 b i t 0 r x r t s c o n t r o l r x i n t e r r u p t s e l e c t e r r o r m o d e p a r i t y m o d e s e l e c t s e l e c t p a r i t y s e l e c t n u m b e r o f b i t s p e r c h a r a c t e r 0 = n o 1 = y e s 0 = r x r d y 1 = f f u l l 0 = c h a r a c t e r 1 = b l o c k 0 0 = w i t h p a r i t y 0 1 = f o r c e p a r i t y 1 0 = n o p a r i t y 1 1 = m u l t i - d r o p m o d e 0 = e v e n 1 = o d d 0 0 = 5 0 1 = 6 1 0 = 7 1 1 = 8 n o t e : m r 1 n f o r e a c h c h a n n e l i s a c c e s s e d w h e n t h e c h a n n e l ? s m r p o i n t e r p o i n t s t o m r 1 . t h e p o i n t e r i s s e t t o m r 1 n b y a h a r d w a r e r e s e t o r b y a ? r e s e t m r p o i n t e r ? c o m m a n d i n v o k e d v i a t h e c h a n n e l ? s c o m m a n d r e g i s t e r . a f t e r a n y r e a d o r w r i t e t o m r 1 , t h e m r p o i n t e r w i l l a u t o m a t i c a l l y p o i n t t o m r 2 . t a b l e 2 6 . m o d e r e g i s t e r s - m r 1 a , m r 1 b
x r 8 8 c 6 8 1 7 2 r e v . 2 . 1 1 b i t 7 b i t 6 b i t 5 b i t 4 b i t 3 b i t 2 b i t 1 b i t 0 c h a n n e l m o d e t x r t s c o n t r o l c t s e n a b l e t x b i t l e n g t h 0 0 = n o r m a l 0 1 = a u t o e c h o 1 0 = l o c a l l o o p 1 1 = r e m o t e l o o p 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = 0 . 5 6 3 1 = 0 . 6 2 5 2 = 0 . 6 8 8 3 = 0 . 7 5 0 4 = 0 . 8 1 3 5 = 0 . 8 7 5 6 = 0 . 9 3 8 7 = 1 . 0 0 0 8 = 1 . 5 6 3 9 = 1 . 6 2 5 a = 1 . 6 8 8 b = 1 . 7 5 0 c = 1 . 8 1 3 d = 1 . 8 7 5 e = 1 . 9 3 8 f = 2 . 0 0 0 t a b l e 2 7 . m o d e r e g i s t e r s - m r 2 a , m r 2 b m r 1 n [ 7 ] - r e c e i v e r r e q u e s t t o s e n d c o n t r o l o r d i n a r i l y , r t s ( r e q u e s t t o s e n d ) i s a s s e r t e d o r n e g a t e d b y i n v o k i n g t h e ? s e t o u t p u t p o r t b i t s c o m m a n d ? o r ? c l e a r o u t p u t p o r t b i t s c o m m a n d ? i n t h e a p p r o p r i a t e m a n n e r . h o w e v e r , i f m r 1 n [ 7 ] = 1 i s s e t , t h e n t h e r e c e i v e r w i l l h a v e c o n t r o l o v e r t h e n e g a t i o n o f t h e - r t s n o u t p u t . s p e c i f i c a l l y , s e t t i n g t h i s b i t w i l l a l l o w t h e r e c e i v e r t o n e g a t e - r t s n i f i t s r h r i s f u l l . t h i s ? f l o w c o n t r o l ? t e c h n i q u e i s u s e f u l i n p r e v e n t i n g r e c e i v e r o v e r r u n e r r o r s . f i g u r e 4 2 p r e s e n t s a d i a g r a m w h i c h i l l u s t r a t e s h o w a r e c e i v e r - c o n t r o l l e d r e q u e s t - t o - s e n d c o n f i g u r a t i o n w o u l d f u n c t i o n . m r 1 n [ 6 ] - r e c e i v e r i n t e r r u p t s e l e c t t h i s b i t s e l e c t s e i t h e r t h e r x r d y s t a t u s b i t o r t h e f f u l l s t a t u s b i t o f t h e c h a n n e l t o b e u s e d a s t h e c r i t e r i a f o r g e n e r a t i n g a n i n t e r r u p t r e q u e s t t o t h e c p u , i s r [ 1 ] f o r c h a n n e l a a n d i s r [ 5 ] f o r c h a n n e l b . m r 1 n [ 5 ] - e r r o r m o d e s e l e c t t h i s b i t c o n t r o l s t h e o p e r a t i o n o f t h e t h r e e f i f o s t a t u s b i t s ( p e , f e , r e c e i v e d b r e a k ) f o r t h e c h a n n e l . i f t h i s b i t i s s e t t o ? 0 ? , t h i s p a r t i c u l a r c h a n n e l w i l l o p e r a t e i n t h e ? c h a r a c t e r ? e r r o r m o d e . i f t h i s b i t s i s s e t t o ? 1 ? , t h i s p a r t i c u l a r c h a n n e l w i l l o p e r a t e i n t h e ? b l o c k ? e r r o r m o d e . i n t h e c h a r a c t e r m o d e t h e s e s t a t u s b i t s a p p l y o n l y t o t h e c h a r a c t e r t h a t i s c u r r e n t l y a t t h e t o p o f t h e f i f o . i n t h e b l o c k m o d e , t h e s e b i t s r e p r e s e n t t h e c u m u l a t i v e l o g i c a l o r o f t h e s t a t u s f o r a l l c h a r a c t e r s c o m i n g t o t h e t o p o f t h e f i f o s i n c e t h e l a s t ? r e s e t e r r o r s t a t u s ? c o m m a n d f o r t h e c h a n n e l w a s i s s u e d . m r 1 n [ 4 : 3 ] - p a r i t y m o d e s e l e c t i f ? w i t h p a r i t y ? o r ? f o r c e p a r i t y ? o p e r a t i o n i s p r o g r a m m e d , a p a r i t y b i t i s a d d e d t o t h e t r a n s m i t t e d c h a r a c t e r s a n d t h e r e c e i v e r p e r f o r m s a p a r i t y c h e c k o n r e c e i v e d c h a r a c t e r s . s e e s e c t i o n h . 2 f o r d e s c r i p t i o n o f m u l t i - d r o p m o d e o p e r a t i o n . m r 1 n [ 2 ] - p a r i t y t y p e s e l e c t t h i s b i t s e l e c t s o d d o r e v e n p a r i t y i f ? w i t h p a r i t y m o d e ? i s p r o g r a m m e d a n d t h e s t a t e o f t h e f o r c e d p a r i t y b i t i f t h e ? f o r c e p a r i t y ? m o d e i s p r o g r a m m e d . i n t h e m u l t i - d r o p m o d e i t s e l e c t s t h e s t a t e o f t h e a / d f l a g b i t . t h i s b i t h a s n o e f f e c t i f ? n o p a r i t y ? i s s e l e c t e d i n m r 1 n [ 4 : 3 ] . m r 1 n [ 1 : 0 ] - b i t s p e r c h a r a c t e r s e l e c t s e l e c t s t h e n u m b e r o f b i t s t o b e t r a n s m i t t e d a n d r e c e i v e d i n t h e d a t a f i e l d o f t h e c h a r a c t e r . t h i s d o e s n o t i n c l u d e s t a r t , p a r i t y , a n d s t o p b i t s . m o d e r e g i s t e r 2 ( c h a n n e l s a a n d b ) m r 2 n f o r e a c h c h a n n e l i s a c c e s s e d w h e n t h e c h a n n e l ? s m r p o i n t e r p o i n t s t o m r 2 n , w h i c h o c c u r s a f t e r a n y a c c e s s t o t h e c h a n n e l ? s m r 1 r e g i s t e r . s u b s e q u e n t ? r e a d s ? o r ? w r i t e s ? t o m r 2 n d o e s n o t c h a n g e t h e c o n t e n t s o f t h e m r p o i n t e r .
x r 8 8 c 6 8 1 7 3 r e v . 2 . 1 1 m r 2 n [ 7 : 6 ] - c h a n n e l m o d e s e l e c t e a c h c h a n n e l c a n o p e r a t e i n o n e o f f o u r m o d e s . d s e t t i n g m r 2 n [ 7 : 6 ] = 0 0 c o n f i g u r e s t h e c h a n n e l t o o p - e r a t e i n t h e n o r m a l m o d e . i n t h i s m o d e , t h e r e c e i v e r a n d t r a n s m i t t e r o p e r a t e i n d e p e n d e n t l y . f i g u r e 3 8 p r e s e n t s a d i a g r a m d e p i c t i n g n o r m a l m o d e o p e r a - t i o n . d s e t t i n g m r 2 n [ 7 : 6 ] = 0 1 p l a c e s t h e c h a n n e l i n t h e a u t o - m a t i c e c h o m o d e , w h i c h a u t o m a t i c a l l y r e - t r a n s m i t s t h e r e c e i v e d d a t a . f i g u r e 3 9 p r e s e n t s a d i a g r a m d e - p i c t i n g a u t o m a t i c e c h o m o d e o p e r a t i o n . t h e f o l l o w - i n g c o n d i t i o n s a p p l y w h i l e i n t h i s m o d e . r x d n i n c o m i n g s e r i a l d a t a r e c e i v e h o l d i n g r e g i s t e r r x c n r e c e i v e s h i f t r e g i s t e r t o d a t a b u s ( t o b e r e a d b y t h e c p u ) t r a n s m i t s h i f t r e g i s t e r t r a n s m i t h o l d i n g r e g i s t e r t x c n t x d n o u t g o i n g s e r i a l d a t a 8 8 f r o m d a t a b u s . ( p a r a l l e l d a t a f r o m t h e c p u ) f i g u r e 3 8 . a b l o c k d i a g r a m d e p i c t i n g n o r m a l m o d e o p e r a t i o n .
x r 8 8 c 6 8 1 7 4 r e v . 2 . 1 1 r x d n i n c o m i n g s e r i a l d a t a r e c e i v e h o l d i n g r e g i s t e r r x c n r e c e i v e s h i f t r e g i s t e r t o d a t a b u s ( t o b e r e a d b y t h e c p u ) t r a n s m i t s h i f t r e g i s t e r t r a n s m i t h o l d i n g r e g i s t e r t x c n t x d n o u t g o i n g s e r i a l d a t a 8 c p u h a s n o a c c e s s t o t h e t r a n s m i t t e r f i g u r e 3 9 . a b l o c k d i a g r a m d e p i c t a u t o m a t i c e c h o m o d e i n t h i s m o d e : 1 . r e c e i v e d d a t a i s t r a n s m i t t e d o n t h e c h a n n e l ? s t x d o u t p u t . 2 . t h e r e c e i v e r m u s t b e e n a b l e d b u t t h e t r a n s m i t t e r n e e d n o t b e e n a b l e d . 3 . t h e c h a n n e l ? s t x r d y a n d t x e m t s t a t u s b i t s a r e i n a c t i v e . 4 . t h e r e c e i v e d p a r i t y i s c h e c k e d b u t i s n o t g e n e r a t e d f o r t r a n s m i s s i o n . t h u s , t r a n s m i t t e d p a r i t y i s a s r e c e i v e d . 5 . c h a r a c t e r f r a m i n g i s c h e c k e d b u t t h e s t o p b i t s a r e t r a n s m i t t e d a s r e c e i v e d . 6 . a r e c e i v e d b r e a k i s e c h o e d a s r e c e i v e d u n t i l t h e n e x t v a l i d s t a r t b i t i s d e t e c t e d . 7 . c p u t o r e c e i v e r c o m m u n i c a t i o n s o p e r a t e s n o r m a l l y , b u t t h e c p u t o t r a n s m i t t e r l i n k i s d i s a b l e d . e a c h d u a r t c h a n n e l c a n b e c o n f i g u r e d i n t o o n e o f t w o d i a g n o s t i c m o d e s . l o c a l l o o p b a c k m o d e t h i s m o d e i s s e l e c t e d b y s e t t i n g m r 2 n [ 7 : 6 ] = 1 0 . f i g u r e 4 0 i s a d i a g r a m d e p i c t i n g l o c a l l o o p b a c k m o d e o p e r a t i o n .
x r 8 8 c 6 8 1 7 5 r e v . 2 . 1 1 r x d n r e c e i v e h o l d i n g r e g i s t e r t o d a t a b u s ( t o b e r e a d b y t h e c p u ) t r a n s m i t h o l d i n g r e g i s t e r t x c n 8 f r o m d a t a b u s . ( p a r a l l e l d a t a f r o m c p u ) 8 t x d n v c c f i g u r e 4 0 . a b l o c k d i a g r a m d e p i c t i n g l o c a l l o o p b a c k m o d e o p e r a t i o n r e c e i v e s h i f t r e g i s t e r t r a n s m i t s h i f t r e g i s t e r i n t h i s m o d e : 1 . t h e t r a n s m i t t e r o u t p u t i s i n t e r n a l l y c o n n e c t e d t o t h e r e c e i v e r i n p u t . 2 . t h e t r a n s m i t c l o c k i s u s e d f o r t h e r e c e i v e r . 3 . t h e c h a n n e l ? s t x d n o u t p u t i s h e l d m a r k i n g ( h i g h ) . 4 . t h e c h a n n e l ? s r x d n i n p u t i s i g n o r e d . 5 . t h e t r a n s m i t t e r i s e n a b l e d , b u t t h e r e c e i v e d n e e d n o t b e e n a b l e d . 6 . c p u t o t r a n s m i t t e r a n d r e c e i v e r c o m m u n i c a t i o n s c o n t i n u e n o r m a l l y . r e m o t e l o o p b a c k m o d e . t h i s m o d e i s s e l e c t e d b y s e t t i n g m r 2 n [ 7 : 6 ] = 1 1 . f i g u r e 4 1 p r e s e n t s a d i a g r a m d e p i c t i n g r e m o t e l o o p b a c k m o d e o p e r a t i o n .
x r 8 8 c 6 8 1 7 6 r e v . 2 . 1 1 r x d n r e c e i v e h o l d i n g r e g i s t e r r e c e i v e s h i f t r e g i s t e r t r a n s m i t s h i f t r e g i s t e r t r a n s m i t h o l d i n g r e g i s t e r t x c n t x d n i n c o m i n g s e r i a l d a t a o u t g o i n g s e r i a l d a t a r x c n n o t e : t h e c p u h a s n o a c c e s s t o t h e s e r i a l d a t a d u r i n g r e m o t e l o o p b a c k m o d e . f i g u r e 4 1 . a b l o c k d i a g r a m d e p i c t i n g r e m o t e l o o p b a c k m o d e i n t h i s m o d e : 1 . r e c e i v e d d a t a i s t r a n s m i t t e d o n t h e c h a n n e l ? s t x d n o u t p u t 2 . r e c e i v e d d a t a i s n o t s e n t t o t h e c p u a n d t h e e r r o r s t a t u s c o n d i t i o n s a r e n o t c h e c k e d . 3 . p a r i t y a n d f r a m i n g ( s t o p b i t s ) a r e t r a n s m i t t e d a s r e c e i v e d . 4 . t h e r e c e i v e r m u s t b e e n a b l e d . 5 . t h e r e c e i v e d b r e a k i s e c h o e d a s r e c e i v e d u n t i l t h e n e x t v a l i d s t a r t b i t i s d e t e c t e d . m r 2 n [ 5 ] - t r a n s m i t t e r r e q u e s t - t o - s e n d c o n t r o l o r d i n a r i l y , t h e r t s ( r e q u e s t t o s e n d ) o u t p u t i s a s s e r t e d o r n e g a t e d b y i n v o k i n g t h e ? s e t o u t p u t p o r t b i t s c o m m a n d ? o r ? c l e a r o u t p u t p o r t b i t s c o m m a n d ? i n t h e a p p r o p r i a t e m a n n e r , b y t h e s y s t e m s o f t w a r e . h o w e v e r , s e t t i n g m r 2 n [ 5 ] = 1 a l l o w s t h e c h a n n e l t r a n s m i t t e r t o n e g a t e r t s a u t o m a t i c a l l y , o n e b i t t i m e a f t e r t h e c h a r a c t e r s i n t h e t s r a n d t h r h a v e b e e n t r a n s m i t t e d a n d a r e n o w e m p t y . f i g u r e 4 4 p r e s e n t s a d i a g r a m i l l u s t r a t e h o w a t r a n s m i t t e r - c o n t r o l l e d r e q u e s t - t o - s e n d c o n f i g u r a t i o n w o u l d f u n c t i o n . m r 2 n [ 4 ] - c l e a r t o s e n d c o n t r o l i f t h i s b i t i s a 0 , t h e c h a n n e l s - c t s n i n p u t ( i p 0 f o r c h a n n e l a , o r i p 1 f o r c h a n n e l b ) h a s n o e f f e c t o n t h e t r a n s m i t t e r . i f t h e b i t i s a ? 1 ? , t h e t r a n s m i t t e r w i l l c h e c k t h e s t a t e o f i t s - c t s n i n p u t e a c h t i m e i s i t r e a d y t o s e n d a c h a r a c t e r . i f - c t s n i s l o w ( o r ? t r u e ? ) , t h e c h a r a c t e r i s t r a n s m i t t e d . i f - c t s n i s h i g h ( o r n e g a t e d ) , t x d n r e m a i n s i n t h e m a r k i n g s t a t e a n d t h e t r a n s m i s s i o n o f t h e n e x t c h a r a c t e r i s d e l a y e d u n t i l - c t s n g o e s l o w . c h a n g e s i n t h e - c t s n i n p u t w h i l e a c h a r a c t e r i s b e i n g s e r i a l i z e d d o n o t a f f e c t t r a n s m i s s i o n o f t h a t c h a r a c t e r . t h i s p h e n o m e n o n i s f u r t h e r i l l u s t r a t e d i n f i g u r e 4 2 a n d f i g u r e 4 4 .
x r 8 8 c 6 8 1 7 7 r e v . 2 . 1 1 m r 2 n [ 3 : 0 ] - s t o p b i t l e n g t h t h i s b i t f i e l d p r o g r a m s t h e d u r a t i o n o f t h e s t o p b i t s a p p e n d e d t o e a c h t r a n s m i t t e d c h a r a c t e r . s t o p b i t d u r a t i o n o f 9 / 1 6 t o 1 b i t t i m e a n d 1 9 / 1 6 t o 2 b i t t i m e s , i n i n c r e m e n t s o f 1 / 1 6 b i t s c a n b e p r o g r a m m e d f o r c h a r a c t e r l e n g t h s o f 6 , 7 a n d 8 b i t s . f o r a 5 b i t c h a r a c t e r , t h e s t o p b i t d u r a t i o n c a n b e p r o g r a m m e d f r o m 1 - 1 / 1 6 t o 2 b i t t i m e s . i f a n e x t e r n a l 1 x c l o c k i s p r o g r a m m e d f o r t h e t r a n s m i t t e r c l o c k ( t x c n ) , m r 2 n [ 3 ] = 0 s e l e c t s a s t o p b i t d u r a t i o n o f o n e b i t t i m e a n d m r 2 n [ 3 ] = 1 s e l e c t s a d u r a t i o n o f t w o b i t t i m e s f o r t r a n s m i s s i o n . t h e r e c e i v e r o n l y c h e c k s f o r m a r k c o n d i t i o n a t t h e c e n t e r o f t h e f i r s t s t o p b i t ( t h a t i s , o n e b i t t i m e a f t e r t h e l a s t d a t a o r p a r i t y b i t i s s a m p l e d ) r e g a r d l e s s o f t h e p r o g r a m m e d t r a n s m i t t e d s t o p b i t l e n g t h . i f t h e r e c e i v e r d o e s n o t s a m p l e a ? m a r k ? a ? f r a m e e r r o r ? ( f e ) i s f l a g g e d i n t h e s t a t u s r e g i s t e r . g . 4 s t a t u s r e g i s t e r , s r n t h e s t a t u s r e g i s t e r p r o v i d e s t h e u s e r w i t h s t a t u s o n t h e r h r a n d t h r ( r e c e i v e r a n d t r a n s m i t t e r f i f o s , r e s p e c t i v e l y ) ; a n d s e r v e s t o p r o v i d e t h e c p u w i t h a m e a s u r e o f t h e q u a l i t y o f t h e r e c e p t i o n o f d a t a b y t h e r e c e i v e r . f i f o s t a t u s i n d i c a t o r s a r e u s e f u l i n p o l l e d s y s t e m s a n d a l l o w s t h e c p u t o c h e c k a n d s e e i f t h e t r a n s m i t t e r i s e m p t y a n d / o r i s r e a d y f o r d a t a f r o m t h e c p u . t h e f i f o s t a t u s i n d i c a t o r s a l s o i n d i c a t e w h e t h e r o r n o t t h e r h r h a s a c h a r a c t e r , w h i c h i s w a i t i n g t o b e r e a d b y t h e c p u , o r i s f u l l a n d i n c a p a b l e o f r e c e i v i n g a n y m o r e c h a r a c t e r s w i t h o u t a n o v e r r u n . t h e t r a n s m i t t e r a n d r e c e i v e r f i f o s t a t u s i n d i c a t o r s a r e l o c a t e d i n t h e l o w e r n i b b l e o f t h e s t a t u s r e g i s t e r . t h e u p p e r n i b b l e o f t h e s t a t u s r e g i s t e r a l e r t s t h e u s e r o f a n y d a t a r e c e p t i o n e r r o r s . t h e b i t - f o r m a t o f t h e s t a t u s r e g i s t e r a n d a d i s c u s s i o n o f e a c h b i t f o l l o w s : b i t 7 b i t 6 b i t 5 b i t 4 b i t 3 b i t 2 b i t 1 b i t 0 r e c e i v e d b r e a k f r a m i n g e r r o r p a r i t y e r r o r o v e r r u n e r r o r t x e m t t x r d y f f u l l r x r d y 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s t a b l e 2 8 . s t a t u s r e g i s t e r - s r a , s r b s r n [ 7 ] r e c e i v e d b r e a k t h i s b i t i n d i c a t e s t h a t a n a l l z e r o c h a r a c t e r o f t h e p r o g r a m m e d c h a r a c t e r l e n g t h w a s r e c e i v e d w i t h o u t a s t o p b i t . o n l y a s i n g l e f i f o p o s i t i o n i s o c c u p i e d w h e n a b r e a k i s r e c e i v e d . a d d i t i o n a l t r a n s f e r s i n t o t h e f i f o a r e i n h i b i t e d u n t i l t h e r x d l i n e r e t u r n s t o t h e m a r k i n g s t a t e f o r a t l e a s t h a l f a b i t t i m e . t h i s i s d e f i n e d a s t w o s u c c e s s i v e e d g e s o f t h e i n t e r n a l o r e x t e r n a l 1 x c l o c k . w h e n t h i s b i t i s s e t , t h e c h a n n e l ? s ? c h a n g e i n b r e a k s t a t u s ? b i t i n t h e i s r i s s e t . t h e b i t i n t h e i s r i s a l s o s e t w h e n t h e e n d o f t h e b r e a k c o n d i t i o n , a s d e f i n e d a b o v e , i s d e t e c t e d . t h e c h i p ? s b r e a k d e t e c t l o g i c c a n d e t e c t b r e a k s t h a t b e g i n i n t h e m i d d l e o f a c h a r a c t e r . h o w e v e r , t h e b r e a k m u s t p e r s i s t u n t i l t h e e n d o f t h e n e x t c h a r a c t e r t i m e i n o r d e r f o r i t t o b e d e t e c t e d . i f t h e e r r o r m o d e , o f t h e c h a n n e l , h a s b e e n s e t t o ? c h a r a c t e r ? m o d e , t h i s b i t o n l y a p p l i e s t o t h e c h a r a c t e r a t t h e t o p o f t h e r h r . t h i s b i t w i l l b e c l e a r e d i f t h e r x d n i n p u t i s b r o u g h t t o a l o g i c ? h i g h ? l e v e l , i n t h e n e x t c h a r a c t e r . i f t h e ? e r r o r ? m o d e h a s b e e n s e t t o ? b l o c k ? m o d e , t h e n t h i s b i t , o n c e s e t w i l l r e m a i n a s s e r t e d u n t i l t h e ? r e s e t e r r o r s t a t u s ? c o m m a n d h a s b e e n i n v o k e d ( p l e a s e s e e t a b l e 3 ) . p l e a s e n o t e t h a t i f t h e e r r o r m o d e i s ? b l o c k ? t h i s b i t , i n t h e s t a t u s r e g i s t e r w i l l r e m a i n s e t , f o r a l l s u b s e q u e n t c h a r a c t e r s , i n d e p e n d e n t o f t h e c o n d i t i o n o f t h e s e r e c e i v e d c h a r a c t e r s , u n t i l t h e ? r e s e t e r r o r s t a t u s ? c o m m a n d h a s b e e n i n v o k e d . s r n [ 6 ] f r a m i n g e r r o r f o l l o w i n g r e c e p t i o n o f t h e c h a r a c t e r b i t s , a n d a n y a s s o c i a t e d p a r i t y b i t , t h e r e c e i v e r w i l l c h e c k f o r a ? m a r k ? c o n d i t i o n o n e b i t - t i m e f o l l o w i n g t h e l a s t d a t a o r p a r i t y b i t . t h i s ? m a r k ? c o n d i t i o n i s t h e s t o p b i t . i f t h e r e c e i v e r d o e s n o t d e t e c t a ? m a r k ? a t t h i s t i m e , t h e b i t i s t o g g l e d ? h i g h ? f l a g g i n g t h e o c c u r r e n c e o f a f r a m e e r r o r ( f e ) . i f t h e e r r o r m o d e h a s b e e n s e t t o ? c h a r a c t e r ? m o d e , t h i s b i t o n l y a p p l i e s t o t h e c h a r a c t e r a t t h e t o p o f t h e r h r . i f
x r 8 8 c 6 8 1 7 8 r e v . 2 . 1 1 t h i s b i t i s s e t f o r a g i v e n c h a r a c t e r , i t w i l l b e c l e a r e d i f t h e s t o p b i t i s p r o p e r l y d e t e c t e d i n t h e n e x t c h a r a c t e r . i f t h e ? e r r o r ? m o d e h a s b e e n s e t t o ? b l o c k ? m o d e , t h e n t h i s b i t , o n c e s e t w i l l r e m a i n a s s e r t e d u n t i l t h e ? r e s e t e r r o r s t a t u s ? c o m m a n d h a s b e e n i n v o k e d ( p l e a s e s e e t a b l e 3 ) . p l e a s e n o t e t h a t i f t h e e r r o r m o d e i s ? b l o c k ? t h i s b i t , i n t h e s t a t u s r e g i s t e r w i l l r e m a i n s e t , f o r a l l s u b s e q u e n t c h a r a c t e r s , i n d e p e n d e n t o f t h e c o n d i t i o n o f t h e s e r e c e i v e d c h a r a c t e r s , u n t i l t h e ? r e s e t e r r o r s t a t u s ? c o m m a n d h a s b e e n i n v o k e d . s r n [ 5 ] p a r i t y e r r o r t h i s b i t i s s e t w h e n t h e ? w i t h p a r i t y ? o r ? f o r c e p a r i t y ? m o d e s a r e p r o g r a m m e d a n d i f t h e c o r r e s p o n d i n g c h a r a c t e r i n t h e d a t a f i f o w a s r e c e i v e d w i t h i n c o r r e c t p a r i t y . i f t h e e r r o r m o d e h a s b e e n s e t t o ? c h a r a c t e r ? m o d e , t h i s b i t o n l y a p p l i e s t o t h e c h a r a c t e r a t t h e t o p o f t h e r h r . i f t h i s b i t i s s e t f o r a g i v e n c h a r a c t e r , i t w i l l b e c l e a r e d i f t h e r e c e i v e d p a r i t y i s c o r r e c t i n t h e n e x t c h a r a c t e r . i f t h e ? e r r o r ? m o d e h a s b e e n s e t t o ? b l o c k ? m o d e , t h e n t h i s b i t , o n c e s e t w i l l r e m a i n a s s e r t e d u n t i l t h e ? r e s e t e r r o r s t a t u s ? c o m m a n d h a s b e e n i n v o k e d ( p l e a s e s e e t a b l e 3 ) . p l e a s e n o t e t h a t i f t h e e r r o r m o d e i s ? b l o c k ? t h i s b i t , i n t h e s t a t u s r e g i s t e r w i l l r e m a i n s e t , f o r a l l s u b s e q u e n t c h a r a c t e r s , i n d e p e n d e n t o f t h e c o n d i t i o n o f t h e s e r e c e i v e d c h a r a c t e r s , u n t i l t h e ? r e s e t e r r o r s t a t u s ? c o m m a n d h a s b e e n i n v o k e d . s r n [ 4 ] o v e r r u n e r r o r i f s e t , t h i s b i t i n d i c a t e s t h a t o n e o r m o r e c h a r a c t e r s i n t h e r e c e i v e d d a t a h a v e b e e n l o s t , i t i s s e t u p o n r e c e i p t o f a n e w c h a r a c t e r w h e n t h e f i f o i s f u l l a n d a c h a r a c t e r i s a l r e a d y i n t h e r s r w a i t i n g f o r a n e m p t y f i f o p o s i t i o n . w h e n t h i s o c c u r s , t h e c h a r a c t e r i n t h e r s r i s o v e r w r i t t e n . p l e a s e n o t e t h a t u n l i k e t h e s t a t u s r e g i s t e r b i t s f o r f e ( f r a m i n g e r r o r ) , p e ( p a r i t y e r r o r ) a n d r b ( r e c e i v e d b r e a k ) , t h e o e ( o v e r r u n e r r o r ) i n d i c a t o r i s a l w a y s f l a g g e d o n a ? b l o c k ? e r r o r m o d e b a s i s . t h e o e c o n d i t i o n i s n e v e r f l a g g e d o n a c h a r a c t e r - t o - c h a r a c t e r b a s i s , a n d o n l y c l e a r e d w h e n t h e ? r e s e t e r r o r s t a t u s ? c o m m a n d i s i n v o k e d . s r n [ 3 ] t r a n s m i t t e r e m p t y ( t x e m t ) t h i s b i t i s s e t w h e n t h e t r a n s m i t t e r u n d e r r u n s . i t i s s e t a f t e r t r a n s m i s s i o n o f t h e l a s t s t o p b i t o f a c h a r a c t e r a n d i f t h e r e i s n o c h a r a c t e r i n t h e t h r o r t s r a w a i t i n g t r a n s m i s s i o n . t h i s b i t i s c l e a r e d w h e n t h e t r a n s m i t t e r i s d i s a b l e d , o r w h e n t h e c p u w r i t e s a n e w c h a r a c t e r t o t h e t h r . s r n [ 2 ] t r a n s m i t t e r r e a d y ( t x r d y ) t h i s b i t , w h e n s e t , i n d i c a t e s t h a t t h e t h r i s e m p t y a n d r e a d y t o a c c e p t a c h a r a c t e r f r o m t h e c p u . t h e b i t i s c l e a r e d w h e n t h e c p u w r i t e s a n e w c h a r a c t e r t o t h e t h r , a n d i s s e t w h e n t h a t c h a r a c t e r i s t r a n s f e r r e d t o t h e t s r . t x r d y i s s e t w h e n t h e t r a n s m i t t e r i s i n i t i a l l y e n a b l e d a n d i s r e s e t w h e n t h e t r a n s m i t t e r i s d i s a b l e d . c h a r a c t e r s l o a d e d i n t o t h e t h r w h i l e t h e t r a n s m i t t e r i s d i s a b l e d w i l l n o t b e t r a n s m i t t e d . s r n [ 1 ] f i f o f u l l ( f f u l l ) t h i s b i t i s s e t w h e n a c h a r a c t e r i s t r a n s f e r r e d f r o m t h e r s r t o t h e r h r a n d t h e t r a n s f e r c a u s e s i t t o b e c o m e f u l l , i . e . , a l l t h r e e f i f o p o s i t i o n s a r e o c c u p i e d . i t i s r e s e t w h e n t h e c p u r e a d s t h e r h r . i f a c h a r a c t e r i s w a i t i n g i n t h e r s r b e c a u s e t h e f i f o i s f u l l , f f u l l w i l l n o t b e r e s e t w h e n t h e c p u r e a d s t h e r h r . s r n [ 0 ] r e c e i v e r r e a d y ( r x r d y ) t h i s b i t i n d i c a t e s t h a t a t l e a s t o n e c h a r a c t e r h a s b e e n r e c e i v e d a n d i s w a i t i n g i n t h e f i f o t o b e r e a d b y t h e c p u . i t i s s e t w h e n a c h a r a c t e r i s t r a n s f e r r e d f r o m t h e r s r t o t h e r h r a n d i s c l e a r e d w i t h t h e c p u r e a d s t h e l a s t c h a r a c t e r c u r r e n t l y s t o r e d i n t h e f i f o . p l e a s e n o t e t h a t s o m e o f t h e c o n d i t i o n s t h a t a r e f l a g g e d b y t h e s t a t u s r e g i s t e r c a n a l s o b e p r o g r a m m e d t o g e n e r a t e a n i n t e r r u p t r e q u e s t t o t h e c p u . h o w e v e r , t h e r e a r e s o m e c o n d i t i o n s t h a t a r e f l a g g e d b y t h e s t a t u s r e g i s t e r t h a t c a n n o t b e p r o g r a m m e d t o g e n e r a t e a n i n t e r r u p t . t h e s e c o n d i t i o n s a r e l i s t e d h e r e : d s r n [ 6 ] - f r a m i n g e r r o r d s r n [ 5 ] - p a r i t y e r r o r d s r n [ 4 ] - o v e r r u n e r r o r t h e r e f o r e , i f s y s t e m l e v e l e r r o r - c h e c k i n g i s n o t e m p l o y e d , t h e u s e r i s r e c o m m e n d e d t o v a l i d a t e e a c h c h a r a c t e r b y c h e c k i n g t h e s t a t u s r e g i s t e r .
x r 8 8 c 6 8 1 7 9 r e v . 2 . 1 1 h . s p e c i a l m o d e s o f o p e r a t i o n h . 1 r t s / c t s h a n d s h a k i n g t h e d u a r t c a n b e p r o g r a m m e d t o s u p p o r t r t s / c t s h a n d s h a k i n g , a s a m e a n s o f d a t a f l o w c o n t r o l w i t h o t h e r d e v i c e s . t h i s s e c t i o n w i l l d e s c r i b e a c o u p l e o f o p t i o n s t h a t t h e d u a r t a l l o w s t h e u s e r i n i m p l e m e n t i n g r t s / c t s h a n d s h a k i n g . s p e c i f i c a l l y , t h e s e o p t i o n s a r e : d r e c e i v e r - c o n t r o l l e d r t s / c t s h a n d s h a k i n g d t r a n s m i t t e r - c o n t r o l l e d r t s / c t s h a n d s h a k i n g h . 1 . 1 r e c e i v e r - c o n t r o l l e d r t s / c t s h a n d s h a k i n g i n t h i s m o d e , t h e r e c e i v e r h a s t h e a b i l i t y t o a u t o m a t i c a l l y n e g a t e t h e r t s o u t p u t ( t o t h e t r a n s m i t t i n g d e v i c e ) . s p e c i f i c a l l y , t h i s m o d e a l l o w s t h e r e c e i v e r t o n e g a t e t h e r t s s i g n a l i f i t s r h r i s f u l l ; a n d , i s t h e r e b y , v e r y e f f e c t i v e i n p r e v e n t i n g r e c e i v e r o v e r r u n e r r o r s . f i g u r e 4 2 p r e s e n t s a d i a g r a m o f a n e x a m p l e i l l u s t r a t i n g t h e o p e r a t i o n o f t h e r e c e i v e r - c o n t r o l l e d r t s c o n f i g u r a t i o n . r x d a t x d b r e c e i v i n g d e v i c e t r a n s m i t t i n g d e v i c e t x d a r x d b r t s a c t s b c t s a r t s b f f u l l a t o c p u f f u l l a r t s a r x d a ( o p 0 ) ( i p 1 ) ( i p 0 ) ( o p 4 ) ( o p 1 ) f i g u r e 4 2 . b l o c k d i a g r a m a n d t i m i n g s e q u e n c e o f t w o d u a r t s c o n n e c t e d i n t h e r e c e i v e r - r t s c o n t r o l l e d c o n f i g u r a t i o n
x r 8 8 c 6 8 1 8 0 r e v . 2 . 1 1 f i g u r e 4 2 s h o w s t w o d u a r t d e v i c e s , a ? r e c e i v i n g d e v i c e ? a n d a ? t r a n s m i t t i n g d e v i c e ? . t h e s e d e v i c e s a r e l a b e l e d s u c h b e c a u s e o f t h e i r r o l e i n t h i s e x a m p l e t r a n s f e r o f d a t a b e t w e e n t h e m . t h i s e x a m p l e i s g o i n g t o i g n o r e , f o r t h e t i m e b e i n g , t h e f a c t t h a t t h e ? r e c e i v i n g d e v i c e ? h a s a t r a n s m i t t e r a n d t h a t t h e ? t r a n s m i t t i n g d e v i c e ? h a s a r e c e i v e r . f u r t h e r , t h i s e x a m p l e , i s u s i n g c h a n n e l a o f t h e ? r e c e i v i n g d e v i c e ? a n d c h a n n e l b o f t h e ? t r a n s m i t t i n g d e v i c e ? . t h e e x a m p l e s t a r t s w i t h t h e a s s u m p t i o n t h a t t h e ? r e c e i v i n g d e v i c e ? h a s b e e n p r o g r a m m e d s u c h t h a t m r 1 a [ 7 ] = 1 . a c c o r d i n g t o s e c t i o n g . 3 , t h i s r e s u l t s i n p r o g r a m m i n g t h e ? r e c e i v i n g d e v i c e ? f o r r e c e i v e r r t s c o n t r o l . a d d i t i o n a l l y , t h e ? t r a n s m i t t i n g d e v i c e ? h a s b e e n p r o g r a m m e d s u c h t h a t m r 2 b [ 4 ] = 1 . a c c o r d i n g t o s e c t i o n g . 3 , t h e t r a n s m i t t e r o f c h a n n e l b o f t h e ? t r a n s m i t t i n g d e v i c e ? h a s n o w b e e n p r o g r a m m e d t o b e u n d e r - c t s b i n p u t c o n t r o l . i n t h i s e x a m p l e , t h e ? r e c e i v i n g d e v i c e ? c o n t r o l s t h e - r t s a o u t p u t s i g n a l . t h i s o u t p u t s i g n a l i s f e d d i r e c t l y i n t o t h e - c t s b i n p u t o f t h e t r a n s m i t t i n g d e v i c e . i f r h r a o f t h e ? r e c e i v i n g d e v i c e ? i s f u l l ( a s d e p i c t e d b y t h e f f u l l a o u t p u t b e i n g a t a l o g i c ? h i g h ? ) , - r t s a w i l l a u t o m a t i c a l l y b e n e g a t e d b y v i r t u e o f t h e r e c e i v e r c o n t r o l l e d r t s f e a t u r e s . c o n s e q u e n t l y , t h e c h a n n e l b t r a n s m i t t e r o f t h e ? t r a n s m i t t i n g d e v i c e ? w i l l h a v e i t s - c t s b i n p u t n e g a t e d a n d w i l l n o t b e p e r m i t t e d t o t r a n s m i t a n y d a t a t o r x d a o f t h e ? r e c e i v i n g d e v i c e ? . i f t h e c p u r e a d s ( o r ? p o p s ? ) t h e r h r a o f t h e r e c e i v i n g d e v i c e , r h r a w i l l n o l o n g e r b e f u l l , a n d t h e f f u l l a i n d i c a t o r w i l l t o g g l e f a l s e . i n t h i s c a s e , t h e f f u l l a i n d i c a t o r i s c o n n e c t e d t o s o m e i n p u t p o r t o f t h e c p u . i n r e s p o n s e t o t h e f f u l l a t o g g l i n g f a l s e , t h e c p u w o u l d i n t e r p r e t t h i s ? n e g a t i v e - e d g e ? o f f f u l l a a s a n i n t e r r u p t r e q u e s t . t h e c p u w o u l d s e r v i c e t h i s ? i n t e r r u p t ? b y ? w r i t i n g ? [ d 7 , . . . , d 0 ] = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ] t o d u a r t a d d r e s s 0 e 1 6 . t h i s a c t i o n e x e c u t e s t h e ? s e t o u t p u t p o r t c o m m a n d ? a n d c a u s e s o p r [ 0 ] t o t o g g l e ? h i g h ? a n d o u t p u t p o r t p i n o p 0 ( o r - r t s a ) t o t o g g l e ? l o w ? . c o n s e q u e n t l y , - r t s a i s n o w a s s e r t e d . w i t h t h e - r t s a o u t p u t o f t h e ? r e c e i v i n g d e v i c e ? b e i n g a s s e r t e d t h e - c t s a i n p u t o f t h e ? t r a n s m i t t i n g d e v i c e ? i s n o w a s s e r t e d , a s w e l l a n d d a t a t r a n s m i s s i o n f r o m t h e ? t r a n s m i t t i n g d e v i c e ? t o t h e ? r e c e i v i n g d e v i c e ? i s n o w p e r m i t t e d . f i g u r e 4 2 s h o w s t h e r x d a i n p u t r e c e i v i n g d a t a a f t e r - r t s a h a s b e e n a s s e r t e d . h o w e v e r , i n t h i s e x a m p l e , t h i s n e w l y r e c e i v e d c h a r a c t e r n o w c a u s e s r h r a o f t h e ? r e c e i v i n g d e v i c e ? t o b e f u l l . t h e f f u l l a i n d i c a t o r s t a t u s i s n o w a s s e r t e d a n d r t s a ( o f t h e ? r e c e i v i n g d e v i c e ? ) i s n o w a u t o m a t i c a l l y n e g a t e d v i a t h e r e c e i v e r c o n t r o l o v e r t h e r t s s i g n a l . t h e r e f o r e , t r a n s m i s s i o n f r o m c h a n n e l b o f t h e t r a n s m i t t i n g d e v i c e i s , o n c e a g a i n , i n h i b i t e d . f i g u r e 4 3 p r e s e n t s a f l o w d i a g r a m i l l u s t r a t i n g a n a l g o r i t h m t h a t c o u l d b e u s e d i n i m p l e m e n t i n g t h e r e c e i v e r - c o n t r o l l e d r t s / c t s h a n d s h a k i n g m o d e .
x r 8 8 c 6 8 1 8 1 r e v . 2 . 1 1 f o r r e c e i v i n g d e v i c e m r 1 a [ 7 ] = 1 f o r t r a n s m i t t i n g d e v i c e m r 2 b [ 7 ] = 1 s t a r t a s s e r t r t s a w r i t e 0 1 h t o q u a r t a d d r e s s 0 e h ( t h i s i n v o k e s t h e ? s e t o u t p u t p o r t b i t s c o m m a n d ? a n d s e t s t h e o u t p u t p o r t p i n , o p 0 t o a l o g i c ? 0 ? . ) i s f f u l l a a s s e r t e d ? n o r t s a i s a u t o m a t i c a l l y n e g a t e d b y r e c e i v e r c o n t r o l l e d r t s f u n c t i o n . y e s i s f f u l l a n e g a t e d ? n o y e s f i g u r e 4 3 . a f l o w d i a g r a m d e p i c t i n g a n a l g o r i t h m t h a t c o u l d b e u s e d t o a p p l y t h e r e c e i v e r - c o n t r o l l e d r t s / c t s h a n d s h a k i n g m o d e h . 1 . 2 t r a n s m i t t e r - c o n t r o l l e d r t s / c t s h a n d s h a k i n g i n t h i s m o d e , t h e t r a n s m i t t e r n o w h a s t h e a b i l i t y t o n e g a t e t h e r t s o u t p u t ( t o t h e r e c e i v i n g d e v i c e ) . s p e c i f i c a l l y , t h i s m o d e a l l o w s t h e t r a n s m i t t e r t o n e g a t y e t h e r t s s i g n a l , o n e b i t p e r i o d a f t e r e m p t y i n g t h e t h r a n d t s r .
x r 8 8 c 6 8 1 8 2 r e v . 2 . 1 1 t x r d y _ a r t s a r x d a c t s a r t s a ( o p 0 ) c t s a ( i p 0 ) t x d a i p 2 ( r t s - i n ) o p 3 ( c t s - o u t ) r x d b t r a n s m i t t i n g d e v i c e r e c e i v i n g d e v i c e t o c p u t x r d y _ a ( o p 7 ) f i g u r e 4 4 . b l o c k d i a g r a m a n d t i m i n g s e q u e n c e o f t w o d u a r t s c o n n e c t e d i n t h e t r a n s m i t t e r - r t s c o n t r o l l e d c o n f i g u r a t i o n .
x r 8 8 c 6 8 1 8 3 r e v . 2 . 1 1 f i g u r e 4 4 s h o w s t w o d u a r t d e v i c e s , o n e l a b e l e d ? t r a n s m i t t i n g d e v i c e ? a n d t h e o t h e r , ? r e c e i v i n g d e v i c e ? . t h i s e x a m p l e s t a r t s w i t h t h e a s s u m p t i o n t h a t t h e ? t r a n s m i t t e r d e v i c e ? h a s b e e n p r o g r a m m e d s u c h t h a t m r 2 a [ 5 ] = 1 , w h i c h r e s u l t s i n p r o g r a m m i n g t h e ? t r a n s m i t t i n g d e v i c e ? f o r t r a n s m i t t e r - r t s c o n t r o l . t h i s e x a m p l e f u r t h e r a s s u m e s t h a t t h e ? t r a n s m i t t i n g d e v i c e ? h a s b e e n p r o g r a m m e d s u c h t h a t m r 2 a [ 4 ] = 1 . a c c o r d i n g t o s e c t i o n g . 3 , t h e t r a n s m i t t e r o f c h a n n e l a o f t h e ? t r a n s m i t t i n g d e v i c e ? h a s n o w b e e n p r o g r a m m e d t o b e u n d e r - c t s a i n p u t c o n t r o l . i n t h e c a s e o f t h e ? r e c e i v i n g d e v i c e ? , i p 2 ( r t s - i n ) h a s b e e n p r o g r a m m e d t o g e n e r a t e a n ? i n p u t p o r t c h a n g e o f s t a t e ? i n t e r r u p t r e q u e s t t o t h e c p u . t h e f i r m w a r e f o r t h e i n t e r r u p t s e r v i c e r o u t i n e s i s w r i t t e n s u c h t h a t i f t h e i p 2 i n p u t w e r e t o c h a n g e a n d i p c r [ 2 ] = 0 , t h e c p u w o u l d ? w r i t e ? [ d 7 , . . . , d 0 ] = [ 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 ] t o d u a r t a d d r e s s 0 e 1 6 . i n t h i s s t e p , t h e i n t e r r u p t s e r v i c e r o u t i n e w o u l d i n v o k e t h e ? s e t o u t p u t p o r t b i t s c o m m a n d ? , a n d i n t h e p r o c e s s t o g g l e o p r [ 3 ] t o a l o g i c ? h i g h ? a n d t h e o u t p u t p o r t p i n , o p 3 , ( c t s - o u t ) t o a l o g i c ? l o w ? . t h i s w o u l d , i n t u r n , a s s e r t t h e - c t s a i n p u t o f t h e ? t r a n s m i t t i n g d e v i c e ? a n d a l l o w i t t o t r a n s m i t d a t a t o t h e ? r e c e i v i n g d e v i c e ? . o n c e c h a n n e l a t r a n s m i t t e r h a s e m p t i e d b o t h i t s t h r a n d t s r o f d a t a , i t w i l l n e g a t e t h e - r t s a o u t p u t , v i a t h e ? t r a n s m i t t e r - r t s c o n t r o l ? f e a t u r e . w h e n t h e - r t s a o u t p u t t h e ? t r a n s m i t t i n g d e v i c e ? i s t o g g l e d ? h i g h ? , t h e i p 2 ( r t s - i n ) i s a l s o t o g g l e d ? h i g h ? , t h e r e b y g e n e r a t i n g a n o t h e r ? i n p u t c h a n g e o f s t a t e ? i n t e r r u p t r e q u e s t t o t h e c p u . w i t h i p c r [ 2 ] = 1 , t h e l i k e l y i n t e r r u p t s e r v i c e r o u t i n e w o u l d b e t o ? w r i t e ? [ d 7 , . . . , d 0 ] = [ 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 ] t o d u a r t a d d r e s s 0 f 1 6 . i n t h i s s t e p , t h e i n t e r r u p t s e r v i c e r o u t i n e w o u l d i n v o k e t h e ? c l e a r o u t p u t p o r t b i t s c o m m a n d ? , a n d i n t h e p r o c e s s t o g g l e o p 3 ( c t s - o u t ) ? h i g h ? . t h i s w o u l d i n t u r n n e g a t e t h e - c t s a i n p u t o f t h e ? t r a n s m i t t i n g d e v i c e ? a n d i n h i b i t t h e t r a n s m i s s i o n o f d a t a f r o m t h e c h a n n e l a o f t h e ? t r a n s m i t t i n g d e v i c e ? . f i g u r e 4 5 p r e s e n t s a f l o w d i a g r a m w h i c h d e p i c t s a n a l g o r i t h m t h a t c o u l d b e u s e d t o i m p l e m e n t t h e t r a n s m i t t e r - c o n t r o l r t s / c t s h a n d s h a k i n g m o d e . p l e a s e n o t e t h a t t h e s h a d e d b l o c k p e r t a i n t o o c c u r r e n c e s w i t h i n t h e ? r e c e i v i n g d e v i c e ? . w h e r e a s t h e ? w h i t e ? b l o c k p e r t a i n t o o p e r a t i o n w i t h i n t h e ? t r a n s m i t t i n g d e v i c e . ?
x r 8 8 c 6 8 1 8 4 r e v . 2 . 1 1 i s t x e m t a s s e r t e d ? s t a r t a s s e r t r t s a ( w r i t e 0 1 h t o d u a r t a d d r e s s 0 e h ) * r t s a i s a u t o m a t i c a l l y n e g a t e d b y r e c e i v e r c o n t r o l l e d r t s f u n c t i o n . ( o p 0 t o g g l e s ? h i g h ? ) i s t x r d y n e g a t e d ? g e n e r a t e ? i n p u t p o r t c h a n g e o f s t a t e ? i n t e r r u p t ( i p 2 ) i n r e c e i v i n g d e v i c e i s i p 2 = 1 ? t o g g l e o p 3 ( c t s _ o u t ) p i n ? l o w ? ( w r i t e 0 8 h t o d u a r t a d d r e s s 0 e h ) t o g g l e o p 3 ( c t s _ o u t ) p i n ? h i g h ? ( w r i t e 0 8 h t o d u a r t a d d r e s s 0 f h ) * c t s a i n p u t i s a s s e r t e d . d a t a t r a n s m i s s i o n i s n o w p e r m i t t e d . - c t s a i n p u t i s n e g a t e d . d a t a t r a n s m i s s i o n i s d i s a b l e d . n o y e s y e s n o y e s n o f i g u r e 4 5 . a f l o w d i a g r a m d e p i c t i n g a n a l g o r i t h m t h a t c o u l d b e u s e d t o r e a l i z e t h e t r a n s m i t t e r - c o n t r o l l e d r t s / c t s h a n d s h a k i n g m o d e h . 2 m u l t i - d r o p ( 8 0 5 1 9 b i t ) m o d e e a c h s e r i a l c h a n n e l o f t h e d u a r t c a n b e c o n f i g u r e d t o o p e r a t e i n a w a k e u p m o d e u s e f u l f o r m u l t i - d r o p o r m u l t i p r o c e s s o r a p p l i c a t i o n s . t h i s s e c t i o n w i l l f i r s t p r e s e n t t h e c o n c e p t o f t h e m u l t i - d r o p m o d e . a f t e r w a r d s , t h e f u n c t i o n a n d p r o c e d u r e o f o p e r a t i n g t h e d u a r t i n t h e m u l t i - d r o p m o d e i s d i s c u s s e d i n s e c t i o n h . 2 . 1 . h . 2 . 1 c o n c e p t o f m u l t i - d r o p m o d e t h i s m o d e i s c o m p a t i b l e w i t h t h e s e r i a l ? n i n e b i t m o d e ? o f 8 0 5 1 f a m i l y m i c r o c o m p u t e r s . i n t h i s m o d e o f o p e r a t i o n a ? m a s t e r s t a t i o n ? , c o n n e c t e d t o a m a x i m u m o f 2 5 6 s l a v e s t a t i o n i s p o s s i b l e , a s d e p i c t e d i n f i g u r e 4 6 .
x r 8 8 c 6 8 1 8 5 r e v . 2 . 1 1 t x d n r x d n r x d n r x d n r x d n m a s t e r d e v i c e s l a v e d e v i c e s 0 0 h 0 1 h 0 2 h f f h f i g u r e 4 6 . a n i l l u s t r a t i o n d e p i c t i n g t h e c o n c e p t o f m u l t i - d r o p m o d e a / d l s b m s b 8 b i t c h a r a c t e r a d d r e s s / d a t a b i t f i g u r e 4 7 . b i t f o r m a t o f c h a r a c t e r d a t a b e i n g t r a n s m i t t e d i n t h e m u l t i - d r o p m o d e t h e ? m a s t e r s t a t i o n ? c o m m u n i c a t e s t o t h e ? s l a v e s t a t i o n s ? b y t r a n s m i t t i n g a c h a r a c t e r ( t y p i c a l l y a b y t e ) w i t h a n ? a d d r e s s / d a t a ? b i t f l a g a p p e n d e d t o t h e e n d o f t h e c h a r a c t e r . t h i s t y p i c a l l y r e s u l t s i n n i n e b i t s o f b e i n g t r a n s m i t t e d f o r e v e r y c h a r a c t e r b y t e , a s p r e s e n t e d i n f i g u r e 4 7 . w h e n t h e ? m a s t e r s t a t i o n ? w a n t s t o t r a n s m i t a b l o c k o f d a t a t o o n e o f s e v e r a l s l a v e s , i t f i r s t s e n d s o u t a n a d d r e s s b y t e t h a t i d e n t i f i e s t h e ? t a r g e t s l a v e ? . a n a d d r e s s b y t e d i f f e r s f r o m a d a t a b y t e i n t h a t t h e n i n t h b i t i s a ? 1 ? i n a n a d d r e s s b y t e a n d a ? 0 ? i n a d a t a b y t e .
x r 8 8 c 6 8 1 8 6 r e v . 2 . 1 1 a n a d d r e s s b y t e , h o w e v e r , i n t e r r u p t s a l l ? s l a v e s ? s o t h a t e a c h c a n e x a m i n e t h e r e c e i v e d b y t e t o t e s t i f i t ( t h e i n d i v i d u a l s l a v e d e v i c e ) i s b e i n g a d d r e s s e d . t h e r e c e i v e r o f t h e a d d r e s s e d s l a v e w i l l b e e n a b l e d a n d w i l l p r e p a r e f o r r e c e p t i o n o f t h e d a t a b y t e s t h a t f o l l o w s . t h e s l a v e s t h a t w e r e n o t a d d r e s s e d w i l l l e a v e s t h e i r r e c e i v e r s d i s a b l e d , a n d w i l l c o n t i n u e t o i g n o r e t h e d a t a b y t e s t h a t f o l l o w s . t h e y w i l l b e i n t e r r u p t e d a g a i n w h e n t h e n e x t a d d r e s s b y t e i s t r a n s m i t t e d b y t h e ? m a s t e r d e v i c e ? . h . 2 . 2 d u a r t m u l t i - d r o p o p e r a t i o n a g i v e n c h a n n e l , w i t h i n t h e d u a r t i s p r o g r a m m e d i n t o t h e m u l t i - d r o p m o d e b y s e t t i n g m r 1 n [ 4 : 3 ] = ? 1 , 1 ? . i n t h i s m o d e , a t r a n s m i t t e d c h a r a c t e r c o n s i s t s o f a s t a r t b i t , t h e p r o g r a m m e d n u m b e r o f d a t a b i t s , t h e a d d r e s s / d a t a ( a / d ) f l a g b i t ; a n d t h e p r o g r a m m e d s t o p b i t l e n g t h . a / d = 0 i n d i c a t e s t h a t t h e c h a r a c t e r i s d a t a , w h i l e a / d = 1 i d e n t i f i e s i t a s a n a d d r e s s . t r a n s m i t t e r o p e r a t i o n d u r i n g m u l t i - d r o p m o d e t h e u s e r / c p u c o n t r o l s t h e s t a t e o f t h e t r a n s m i t t e d c h a r a c t e r b y p r o g r a m m i n g m r 1 n [ 2 ] o f t h e c h a n n e l p r i o r t o l o a d i n g t h e d a t a b i t s i n t o t h e t h r . s e t t i n g m r 1 n [ 2 ] = ? 0 ? r e s u l t s i n a / d = ? 0 ? a n d s e t t i n g m r 1 n [ 2 ] = ? 1 ? r e s u l t s i n a / d = ? 1 ? . f i g u r e 4 8 p r e s e n t s a p r o c e d u r a l f l o w d i a g r a m f o r t r a n s m i t t i n g c h a r a c t e r s ( a d d r e s s o r d a t a ) , w h i l e i n t h e m u l t i - d r o p m o d e . s t a r t i n v o k e t h e ? r e s e t m r p o i n t e r ? c o m m a n d . ( w r i t e 1 x h t o a p p r o p r i a t e c o m m a n d r e g i s t e r ) s e t a / d b i t t o ? 0 ? ( w r i t e x x x x x 0 x x t o m r 1 n r e g i s t e r ) t r a n s m i t a d d r e s s c h a r a c t e r t o s l a v e d e v i c e . ( w r i t e c h a r a c t e r t o t h r n ) i n v o k e t h e ? r e s e t m r p o i n t e r ? c o m m a n d . ( w r i t e 1 x h t o a p p r o p r i a t e c o m m a n d r e g i s t e r ) s e t a / d b i t t o ? 1 ? ( w r i t e x x x x x 1 x x t o m r 1 n r e g i s t e r ) t r a n s m i t d a t a c h a r a c t e r t o s l a v e d e v i c e . ( w r i t e c h a r a c t e r t o t h r n ) n o y e s f i g u r e 4 8 . a f l o w d i a r g a m d e p i c t i n g a p r o c e d u r e t h a t c a n b e u s e d t o t r a n s m i t c h a r a c t e r s i n t h e m u l t i - d r o p m o d e a r e t h e r e m o r e d a t a c h a r a c t e r s t o w r i t e t o a c t i v e s l a v e d e v i c e ?
x r 8 8 c 6 8 1 8 7 r e v . 2 . 1 1 r e c e i v e r o p e r a t i o n d u r i n g m u l t i - d r o p m o d e w h e n a c h a n n e l h a s b e e n p r o g r a m m e d i n t o t h e m u l t i - d r o p m o d e , a n d t h e r e c e i v e r h a s b e e n d i s a b l e d ( a t y p i c a l c o n f i g u r a t i o n ) , t h e r e c e i v e r w i l l l o a d a c h a r a c t e r i n t o t h e r h r a n d s e t t h e r x r d y i n d i c a t o r ( a n d / o r i n t e r r u p t ) i f t h e a / d b i t i s ? 1 ? ( a d d r e s s f l a g ) . h o w e v e r , t h e c h a r a c t e r w i l l b e d i s c a r d e d i f i t s a / d b i t i s ? 0 ? ( d a t a f l a g ) . t h e r e f o r e , i n r e s p o n s e t o t h e r x r d y i n d i c a t o r , t h e c p u s h o u l d t h e n r e a d t h e r e c e i v e d c h a r a c t e r a n d d e t e r m i n e i f t h e a d d r e s s t h a t i t r e p r e s e n t s m a t c h e s t h a t o f t h e c p u . i f t h e a d d r e s s e s d o m a t c h , ( i n d i c a t i n g t h a t i t i s t h e t a r g e t s l a v e ) , t h e n t h e c p u s h o u l d e n a b l e t h e r e c e i v e r , i n p r e p a r a t i o n f o r t h e s u b s e q u e n t b l o c k s o f d a t a . o n c e t h e r e c e i v e r h a s b e e n e n a b l e d t h e r e c e i v e r s e r i a l d a t a w i l l b e p r o c e s s e d a s i n n o r m a l o p e r a t i o n . t h e r e c e i v e d c h a r a c t e r s a r e a c c e s s i b l e t o t h e c p u b y r e a d i n g t h e r h r . t h e s t a t e o f t h e a / d f l a g b i t i s a v a i l a b l e a t s r n [ 5 ] , t h e s t a t u s r e g i s t e r b i t n o r m a l l y u s e d t o i n d i c a t e ? p a r i t y e r r o r ? . t h e r e f o r e , i n c o n j u n c t i o n w i t h r e c e i v e r e a c h n e w c h a r a c t e r , t h e c p u s h o u l d c o n t i n u e t o m o n i t o r s r n [ 5 ] i n o r d e r t o v e r i f y t h a t i t i s a ? 0 ? ( d a t a c h a r a c t e r s ) . o n c e t h e ? t a r g e t c p u ? d e t e c t s a n e w a d d r e s s c h a r a c t e r , s r n [ 5 ] = ? 1 ? , i t s h o u l d c o m p a r e t h i s a d d r e s s w i t h i t s o w n . i f t h e a d d r e s s e s d o n o t m a t c h , t h e n t h i s c p u i s n o t t h e i n t e n d e d r e c i p i e n t o f t h e n e x t b l o c k o f d a t a , a n d n o w s h o u l d d i s a b l e t h e r e c e i v e r . f i g u r e 4 9 p r e s e n t s a f l o w d i a g r a m d e p i c t i n g a r e c o m m e n d e d p r o c e d u r e f o r h a n d l i n g r e c e i v e d c h a r a c t e r s w h i l e i n t h e m u l t i - d r o p m o d e . s t a r t r e c e i v e r i s d i s a b l e d c h a n n e l i s c o m m a n d e d i n t o m u l t i - d r o p m o d e . m r 1 n [ 4 : 3 ] = [ 1 , 1 ] r e j e c t c h a r a c t e r r e c e i v e r r e m a i n s d i s a b l e d r e a d i n a d d r e s s c h a r a c t e r f r o m r h r n h a s r x r d y i n d i c a t o r b e e n a s s e r t e d ? n o y e s n o e n a b l e r e c e i v e r ( w r i t e x 2 h t o t h e a p p r o p r i a t e c h a n n e l c o m m a n d r e g i s t e r ) r e a d i n d a t a c h a r a c t e r f r o m r h r . c h e c k s r n [ 5 ] d o e s n e w l y r e c e i v e d a d d r e s s m a t c h c p u a d d r e s s ? i s t h e n e w c h a r a c t e r a d a t a c h a r a c t e r s r n [ 5 ] = 1 ? y e s y e s n o f i g u r e 4 9 . a f l o w d i a g r a m d e p i c t i n g a p r o c e d u r e t h a t c a n b e u s e d t o r e c e i v e c h a r a c t e r s i n t h e m u l t i - d r o p m o d e .
x r 8 8 c 6 8 1 8 8 r e v . 2 . 1 1 h . 3 s t a n d b y m o d e t h e d u a r t m a y b e p l a c e d i n a s t a n d b y m o d e t o c o n s e r v e p o w e r w h e n i t s o p e r a t i o n i s n o t r e q u i r e d . u p o n r e s e t , t h e d u a r t w i l l b e i n t h e ? a c t i v e o p e r a t i o n ? m o d e . a ? s e t s t a n d b y m o d e ? c o m m a n d i s s u e d v i a t h e c h a n n e l a c o m m a n d r e g i s t e r d i s a b l e s a l l c l o c k s o n t h e d e v i c e e x c e p t f o r t h e c r y s t a l o s c i l l a t o r , w h i c h s i g n i f i c a n t l y r e d u c e s t h e o p e r a t i n g c u r r e n t . i n t h i s m o d e t h a t o n l y f u n c t i o n s w h i c h w i l l o p e r a t e c o r r e c t l y a r e r e a d i n g t h e i n p u t p o r t , w r i t i n g t h e o u t p u t p o r t a n d t h e ? s e t a c t i v e m o d e ? c o m m a n d . t h e l a t t e r , a l s o i n v o k e d v i a t h e c h a n n e l a c o m m a n d r e g i s t e r , r e s t o r e s t h e d e v i c e t o n o r m a l o p e r a t i o n w i t h i n 2 5  s . r e s e t t i n g t h e t r a n s m i t t e r s a n d r e c e i v e r s a n d w r i t i n g 0 0 h i n t o t h e i m r ( i n t e r r u p t m a s k r e g i s t e r ) b e f o r e g o i n g i n t o t h e s t a n d b y m o d e i s r e c o m m e n d e d t o p r e v e n t a n y s p u r i o u s i n t e r r u p t s f r o m b e i n g g e n e r a t e d . t h e c h i p s h o u l d b e r e p r o g r a m m e d a f t e r t h e ? s e t a c t i v e m o d e ? c o m m a n d s i n c e r e g i s t e r c o n t e n t s a r e n o t g u a r a n t e e d t o r e m a i n s t a b l e d u r i n g t h e s t a n d b y m o d e . a c t i v e o p e r a t i o n c a n a l s o b e r e s t o r e d v i a h a r d w a r e r e s e t . i . c o m m e n t s a b o u t t h e x r 8 8 c 6 8 1 i n 2 8 p i n d i p p a c k a g e m u c h o f t h i s d a t a s h e e t d i s c u s s e d f e a t u r e s w h i c h a r e a v a i l a b l e t o t h e d u a r t s w h i c h a r e p a c k a g e d i n t h e 4 0 p i n d i p o r t h e 4 4 p i n p l c c . h o w e v e r , b e c a u s e o f t h e r e d u c e d n u m b e r o f p i n s t h e d u a r t s i n t h e 2 8 p i n p a c k a g e d o n o t h a v e t h e f o l l o w i n g f e a t u r e s . d c a n n o t o p e r a t e i n t h e z - m o d e t h i s i s d u e t o l a c k o f t h e - i a c k , i e i , a n d i e o p i n s d c a n n o t p e r f o r m m o d e m s h a k i n g f u n c t i o n s t h i s i s d u e t o t h e l a c k o f a n y c t s p i n s j . p r o g r a m m i n g o p e r a t i o n o f t h e d u a r t i s p r o g r a m m e d b y w r i t i n g c o n t r o l w o r d s i n t o t h e a p p r o p r i a t e r e g i s t e r s , w h i l e o p e r a t i o n a l f e e d b a c k i s p r o v i d e d b y s t a t u s r e g i s t e r s w h i c h c a n b e r e a d b y t h e c p u . r e g i s t e r a d d r e s s i n g i s s h o w n i n . a h a r d w a r e r e s e t c l e a r s t h e c o n t e n t s o f t h e s r n , i m r , i s r , o p r , a n d o p c r r e g i s t e r s a n d i n i t i a l i z e s t h e i v r t o 0 f 1 6 . d u r i n g o p e r a t i o n , c a r e s h o u l d b e e x e r c i s e d i f t h e c o n t e n t s o f c o n t r o l r e g i s t e r s a r e t o b e c h a n g e d , s i n c e c e r t a i n c h a n g e s m a y r e s u l t i n i m p r o p e r o p e r a t i o n . f o r e x a m p l e : c h a n g i n g t h e n u m b e r o f b i t s p e r c h a r a c t e r w h i l e d a t a i s b e i n g r e c e i v e d m a y r e s u l t i n r e c e p t i o n o f e r r o n e o u s c h a r a c t e r . i n g e n e r a l , c h a n g e s t o r e g i s t e r s w h i c h c o n t r o l r e c e i v e r o r t r a n s m i t t e r o p e r a t i o n s h o u l d b e m a d e o n l y w h i l e t h e t r a n s m i t t e r o r r e c e i v e r a r e d i s a b l e d , a n d c e r t a i n c h a n g e s t o t h e a c r s h o u l d b e m a d e o n l y w h e n t h e c / t i s s t o p p e d . m o d e , c o m m a n d , c l o c k s e l e c t , a n d s t a t u s r e g i s t e r s a r e d u p l i c a t e d f o r e a c h c h a n n e l t o p r o v i d e t o t a l i n d e p e n d e n t o p e r a t i o n . t a b l e 2 9 t h r o u g h t a b l e 4 1 s u m m a r i z e s t h e b i t a s s i g n m e n t s f o r e a c h r e g i s t e r . r e g i s t e r s u m m a r y b i t 7 b i t 6 b i t 5 b i t 4 b i t 3 b i t 2 b i t 1 b i t 0 r x r t s c o n t r o l r x i n t s e l e c t e r r o r m o d e p a r i t y m o d e s e l e c t p a r i t y s e l e c t n u m b e r o f b i t s / c h a r . 0 = n o 1 = y e s 0 = r x r d y 1 = f f u l l 0 = c h a r . 1 = b l o c k 0 0 = w i t h p a r i t y 0 1 = f o r c e p a r i t y 1 0 = n o p a r i t y 1 1 = m u l t i - d r o p m o d e 0 = e v e n 1 = o d d 0 0 = 5 0 1 = 6 1 0 = 7 1 1 = 8 t a b l e 2 9 . m o d e r e g i s t e r s 1 : m r 1 a , m r 1 b
x r 8 8 c 6 8 1 8 9 r e v . 2 . 1 1 b i t 7 b i t 6 b i t 5 b i t 4 b i t 3 b i t 2 b i t 1 b i t 0 c h a n n e l m o d e t x r t s c o n t r o l c t s e n a b l e t x s t o p b i t l e n g t h 0 0 = n o r m a l 0 1 = a u t o e c h o 1 0 = l o c a l l o o p 1 1 = r e m o t e l o o p 0 = n o 1 = y e s 0 = n o 1 = y e s 0 h = 0 . 5 6 3 1 h = 0 . 6 2 5 2 h = 0 . 6 8 8 3 h = 0 . 7 5 0 4 h = 0 . 8 1 3 5 h = 0 . 8 7 5 6 h = 0 . 9 3 8 7 h = 1 . 0 0 0 8 h = 1 . 5 6 3 9 h = 1 . 6 2 5 a h = 1 . 6 8 8 b h = 1 . 7 5 0 c h = 1 . 8 1 3 d h = 1 . 8 7 5 e h = 1 . 9 3 8 f h = 2 . 0 0 0 t a b l e 3 0 . m o d e r e g i s t e r 2 : m r 2 a , m r 2 b b i t 7 b i t 6 b i t 5 b i t 4 b i t 3 b i t 2 b i t 1 b i t 0 r e c e i v e r c l o c k s e l e c t t r a n s m i t t e r c l o c k s e l e c t s e e t a b l e 9 s e e t a b l e 9 t a b l e 3 1 . c l o c k s e l e c t r e g i s t e r s : c s r a , c s r b b i t 7 b i t 6 b i t 5 b i t 4 b i t 3 b i t 2 b i t 1 b i t 0 m i s c e l l a n e o u s c o m m a n d s e n a b l e / d i s a b l e t x e n a b l e / d i s a b l e r x s e e t e x t i n s e c t i o n b . 2 . 0 0 = n o c h a n g e 0 1 = e n a b l e t x 1 0 = d i s a b l e t x 1 1 = n o t a l l o w e d ( d o n o t u s e ) 0 0 = n o c h a n g e 0 1 = e n a b l e t x 1 0 = d i s a b l e t x 1 1 = n o t a l l o w e d ( d o n o t u s e ) t a b l e 3 2 . c o m m a n d r e g i s t e r s : c r a , c r b b i t 7 b i t 6 b i t 5 b i t 4 b i t 3 b i t 2 b i t 1 b i t 0 r e c e i v e d b r e a k f r a m i n g e r r o r p a r i t y e r r o r o v e r r u n e r r o r t x e m t t x r d y f f u l l r x r d y 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s t a b l e 3 3 . s t a t u s r e g i s t e r s : s r a , s r b b i t 7 b i t 6 b i t 5 b i t 4 b i t 3 b i t 2 b i t 1 b i t 0 o p 7 o p 6 o p 5 o p 4 o p 3 o p 2 0 = o p r [ 7 ] 1 = t x r d y b 0 = o p r [ 6 ] 1 = t x r d y a 0 = o p r [ 5 ] 1 = r x r d y / f f u l l b 0 = o p r [ 4 ] 1 = r x r d y / f f u l l a 0 0 = o p r [ 3 ] 0 1 = c / t # 1 o u t p u t 1 0 = t x c b ( 1 x ) 1 1 = r x c b ( 1 x ) 0 0 = o p r [ 2 ] 0 1 = t x c a ( 1 6 x ) 1 0 = t x c a ( 1 x ) 1 1 = r x c a ( 1 x ) t a b l e 3 4 . o u t p u t p o r t c o n f i g u r a t i o n r e g i s t e r : o p c r
x r 8 8 c 6 8 1 9 0 r e v . 2 . 1 1 b i t 7 b i t 6 b i t 5 b i t 4 b i t 3 b i t 2 b i t 1 b i t 0 b r g s e t s e l e c t c o u n t e r / t i m e r # 1 m o d e a n d s o u r c e d e l t a i p 3 i n t e r r u p t d e l t a i p 2 i n t e r r u p t d e l t a i p 1 i n t e r r u p t d e l t a i p 0 i n t e r r u p t 0 = s e t 1 1 = s e t 2 s e e t a b l e 7 0 = o f f 1 = o n 0 = o f f 1 = o n 0 = o f f 1 = o n 0 = o f f 1 = o n t a b l e 3 5 . a u x i l i a r y c o n t r o l r e g i s t e r : a c r b i t 7 b i t 6 b i t 5 b i t 4 b i t 3 b i t 2 b i t 1 b i t 0 d e l t a i p 3 d e l t a i p 2 d e l t a i p 1 d e l t a i p 0 i p 3 i p 2 i p 1 i p 0 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = l o w 1 = h i g h 0 = l o w 1 = h i g h 0 = l o w 1 = h i g h 0 = l o w 1 = h i g h t a b l e 3 6 . i n p u t p o r t c o n f i g u r a t i o n r e g i s t e r , i p c r b i t 7 b i t 6 b i t 5 b i t 4 b i t 3 b i t 2 b i t 1 b i t 0 i n p u t p o r t c h a n g e d e l t a b r e a k b r x r d y / f f u l l b t x r d y b c o u n t e r # 1 r e a d y d e l t a b r e a k a r x r d y / f f u l l a t x r d y a 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s 0 = n o 1 = y e s t a b l e 3 7 . i n t e r r u p t s t a t u s r e g i s t e r , i s r b i t 7 b i t 6 b i t 5 b i t 4 b i t 3 b i t 2 b i t 1 b i t 0 i n p u t p o r t c h a n g e d e l t a b r e a k b r x r d y / f f u l l b t x r d y b c o u n t e r # 1 r e a d y d e l t a b r e a k a r x r d y / f f u l l a t x r d y a 0 = o f f 1 = o n 0 = o f f 1 = o n 0 = o f f 1 = o n 0 = o f f 1 = o n 0 = o f f 1 = o n 0 = o f f 1 = o n 0 = o f f 1 = o n 0 = o f f 1 = o n t a b l e 3 8 . i n t e r r u p t m a s k r e g i s t e r , i m r b i t 7 b i t 6 b i t 5 b i t 4 b i t 3 b i t 2 b i t 1 b i t 0 c / t ( 1 5 ) c / t ( 1 4 ) c / t ( 1 3 ) c / t ( 1 2 ) c / t ( 1 1 ) c / t ( 1 0 ) c / t ( 9 ) c / t ( 8 ) t a b l e 3 9 . c o u n t e r / t i m e r u p p e r b y t e r e g i s t e r , c t u r b i t 7 b i t 6 b i t 5 b i t 4 b i t 3 b i t 2 b i t 1 b i t 0 c / t ( 7 ) c / t ( 6 ) c / t ( 5 ) c / t ( 4 ) c / t ( 3 ) c / t ( 2 ) c / t ( 1 ) c / t ( 0 ) t a b l e 4 0 . c o u n t e r / t i m e r l o w e r b y t e r e g i s t e r , c t l r b i t 7 b i t 6 b i t 5 b i t 4 b i t 3 b i t 2 b i t 1 b i t 0 i v r ( 7 ) i v r ( 6 ) i v r ( 5 ) i v r ( 4 ) i v r ( 3 ) i v r ( 2 ) i v r ( 1 ) i v r ( 0 ) t a b l e 4 1 . i n t e r r u p t v e c t o r r e g i s t e r : i v r
x r 8 8 c 6 8 1 9 1 r e v . 2 . 1 1 k . t i m i n g d i a g r a m s 2 . 0 v 0 . 8 v t e s t l e v e l s 2 . 0 v 0 . 8 v 4 . 0 v f i g u r e 5 0 . i n p u t a n d o u t p u t l e v e l s f o r t i m i n g m e a s u r e m e n t s n o t e : a c t e s t i n g i n p u t s a r e d r i v e n a t 0 . 4 v f o r a l o g i c ? 0 ? a n d 2 . 4 v f o r a l o g i c ? 1 ? e x c e p t f o r - 4 0 t o 8 5 ( c a n d - 5 5 t o 1 2 5 ( c , l o g i c ? 1 ? s h a l l b e 2 . 6 v . t i m i n g m e a s u r e m e n t s a r e m a d e a t 0 . 8 v f o r a l o g i c ? 0 ? a n d 2 . 0 v f o r a l o g i c ? 1 ? . r e s e t t r e s f i g u r e 5 1 . r e s e t t i m i n g
x r 8 8 c 6 8 1 9 2 r e v . 2 . 1 1 a 0 - a 3 - c s - w r d 0 - d 7 ( r e a d ) f l o a t n o t v a l i d v a l i d f l o a t d 0 - d 7 ( w r i t e ) v a l i d t a s t c s t a h t c h - r d t r w d t d s t d h t d d t r w d t d f t r w f i g u r e 5 2 . x r 8 8 c 6 8 1 r e a d a n d w r i t e c y c l e t i m i n g
x r 8 8 c 6 8 1 9 3 r e v . 2 . 1 1 n o t v a l i d t e o d t d i o - r d - i a c k i e i d 0 - d 7 f l o a t v e c t o r f l o a t - i n t r i e o t d i o t e i s t d d t i a s t r w t i a h t d f r e s e t i u s c o m m a n d f i g u r e 5 3 . x r 8 8 c 6 8 1 z m o d e i n t e r r u p t c y c l e t i m i n g
x r 8 8 c 6 8 1 9 4 r e v . 2 . 1 1 - w r o r - c s - r d o r - c s i p 0 - i p 6 o p 0 - o p 7 t p s t p h o l d d a t a n e w d a t a t p d f i g u r e 5 4 . p o r t t i m i n g - r d o r - c s o r - w r i n t e r r u p t o u t p u t t i r f i g u r e 5 5 . i n t e r r u p t t i m i n g
x r 8 8 c 6 8 1 9 5 r e v . 2 . 1 1 t c l k x 1 / c l k c / t c l k r x c t x c x r 8 8 c 6 8 1 x 1 x 2 c 1 c 2 3 . 6 8 6 4 m h z p a r a l l e l r e s o n a n t c r y s t a l c 1 : 1 0 - 1 5 p f + ( s t r a y < 5 p f ) c 2 : 0 - 5 p f + ( s t r a y < 5 p f ) x r 8 8 c 6 8 1 x 1 x 2 c 1 c 2 r 1 r 2 3 . 6 8 6 4 m h z p a r a l l e l r e s o n a n t c r y s t a l c 1 : 1 0 p f + ( s t r a y < 5 p f ) c 2 : 1 0 p f + ( s t r a y < 5 p f ) r 1 : 1 0 0 o h m r 2 : 1 0 0 o h m f i g u r e 5 6 . c l o c k t i m i n g t c t c t r t x t c l k t c t c t r t x
x r 8 8 c 6 8 1 9 6 r e v . 2 . 1 1 t x c ( i n p u t ) t x c ( 1 x o u t p u t ) t x d 1 b i t t i m e ( 1 o r 1 6 c l o c k s ) t t x d t t c s f i g u r e 5 7 . t r a n s m i t t e r t i m i n g r x c 1 x i n p u t ) r x d t r x s t r x h f i g u r e 5 8 . r e c e i v e r t i m i n g
x r 8 8 c 6 8 1 9 7 r e v . 2 . 1 1 4 4 l e a d p l a s t i c l e a d e d c h i p c a r r i e r ( p l c c ) r e v . 1 . 0 0 1 d d 1 a a 1 d d 1 d 3 a 0 . 1 6 5 0 . 1 8 0 4 . 1 9 4 . 5 7 a 1 0 . 0 9 0 0 . 1 2 0 2 . 2 9 3 . 0 5 a 2 0 . 0 2 0 - - - - - - . 0 . 5 1 - - - - - - b 0 . 0 1 3 0 . 0 2 1 0 . 3 3 0 . 5 3 b 1 0 . 0 2 6 0 . 0 3 2 0 . 6 6 0 . 8 1 c 0 . 0 0 8 0 . 0 1 3 0 . 1 9 0 . 3 2 d 0 . 6 8 5 0 . 6 9 5 1 7 . 4 0 1 7 . 6 5 d 1 0 . 6 5 0 0 . 6 5 6 1 6 . 5 1 1 6 . 6 6 d 2 0 . 5 9 0 0 . 6 3 0 1 4 . 9 9 1 6 . 0 0 d 3 0 . 5 0 0 t y p . 1 2 . 7 0 t y p . e 0 . 0 5 0 b s c 1 . 2 7 b s c h 1 0 . 0 4 2 0 . 0 5 6 1 . 0 7 1 . 4 2 h 2 0 . 0 4 2 0 . 0 4 8 1 . 0 7 1 . 2 2 r 0 . 0 2 5 0 . 0 4 5 0 . 6 4 1 . 1 4 s y m b o l m i n m a x m i n m a x i n c h e s m i l l i m e t e r s b a 2 b 1 e s e a t i n g p l a n e d 2 2 4 4 n o t e : t h e c o n t r o l d i m e n s i o n i s t h e i n c h c o l u m n d 3 4 5 x h 2 4 5 x h 1 c r
x r 8 8 c 6 8 1 9 8 r e v . 2 . 1 1 d b e b 1 4 0 l e a d c e r a m i c d u a l - i n - l i n e ( 6 0 0 m i l c d i p ) r e v . 1 . 0 0 4 0 1 2 0 2 1 a c e 1 l a 1 s e a t i n g p l a n e b a s e p l a n e a a 0 . 1 0 0 0 . 2 2 5 2 . 5 4 5 . 7 2 a 1 0 . 0 1 5 0 . 0 7 5 0 . 3 8 1 . 9 1 b 0 . 0 1 4 0 . 0 2 6 0 . 3 6 0 . 6 6 b 1 0 . 0 4 5 0 . 0 6 5 1 . 1 4 1 . 6 5 c 0 . 0 0 8 0 . 0 1 8 0 . 2 0 0 . 4 6 d 1 . 9 9 0 2 . 0 9 0 5 0 . 5 5 5 3 . 0 9 e 1 0 . 5 5 0 0 . 6 1 0 1 3 . 9 7 1 5 . 4 9 e 0 . 6 0 0 b s c 1 5 . 2 4 b s c e 0 . 1 0 0 b s c 2 . 5 4 b s c l 0 . 1 2 5 0 . 2 0 0 3 . 1 8 5 . 0 8 a 0 1 5 0 1 5 s y m b o l m i n m a x m i n m a x i n c h e s m i l l i m e t e r s e n o t e : t h e c o n t r o l d i m e n s i o n i s t h e i n c h c o l u m n
x r 8 8 c 6 8 1 9 9 r e v . 2 . 1 1 2 8 l e a d p l a s t i c d u a l - i n - l i n e ( 6 0 0 m i l p d i p ) r e v . 1 . 0 0 s y m b o l m i n m a x m i n m a x i n c h e s a 0 . 1 6 0 0 . 2 5 0 4 . 0 6 6 . 3 5 a 1 0 . 0 1 5 0 . 0 7 0 0 . 3 8 1 . 7 8 a 2 0 . 1 2 5 0 . 1 9 5 3 . 1 8 4 . 9 5 b 0 . 0 1 4 0 . 0 2 4 0 . 3 6 0 . 5 6 b 1 0 . 0 3 0 0 . 0 7 0 0 . 7 6 1 . 7 8 c 0 . 0 0 8 0 . 0 1 4 0 . 2 0 0 . 3 8 d 1 . 3 8 0 1 . 5 6 5 3 5 . 0 5 3 9 . 7 5 e 0 . 6 0 0 0 . 6 2 5 1 5 . 2 4 1 5 . 8 8 e 1 0 . 4 8 5 0 . 5 8 0 1 2 . 3 2 1 4 . 7 3 e 0 . 1 0 0 b s c 2 . 5 4 b s c e a 0 . 6 0 0 b s c 1 5 . 2 4 b s c e b 0 . 6 0 0 0 . 7 0 0 1 5 . 2 4 1 7 . 7 8 l 0 . 1 1 5 0 . 2 0 0 2 . 9 2 5 . 0 8 a 0 1 5 0 1 5 m i l l i m e t e r s 2 8 1 1 5 1 4 d b 1 a 1 e 1 e a l b s e a t i n g p l a n e a e c a 2 n o t e : t h e c o n t r o l d i m e n s i o n i s t h e i n c h c o l u m n e b e a
x r 8 8 c 6 8 1 1 0 0 r e v . 2 . 1 1 4 0 1 2 1 2 0 d e 4 0 l e a d p l a s t i c d u a l - i n - l i n e ( 6 0 0 m i l p d i p ) r e v . 1 . 0 0 s y m b o l m i n m a x m i n m a x a 0 . 1 6 0 0 . 2 5 0 4 . 0 6 6 . 3 5 a 1 0 . 0 1 5 0 . 0 7 0 0 . 3 8 1 . 7 8 a 2 0 . 1 2 5 0 . 1 9 5 3 . 1 8 4 . 9 5 b 0 . 0 1 4 0 . 0 2 4 0 . 3 6 0 . 5 6 b 1 0 . 0 3 0 0 . 0 7 0 0 . 7 6 1 . 7 8 c 0 . 0 0 8 0 . 0 1 4 0 . 2 0 0 . 3 8 d 1 . 9 8 0 2 . 0 9 5 5 0 . 2 9 5 3 . 2 1 e 0 . 6 0 0 0 . 6 2 5 1 5 . 2 4 1 5 . 8 8 e 1 0 . 4 8 5 0 . 5 8 0 1 2 . 3 2 1 4 . 7 3 e 0 . 1 0 0 b s c 2 . 5 4 b s c e a 0 . 6 0 0 b s c 1 5 . 2 4 b s c e b 0 . 6 0 0 0 . 7 0 0 1 5 . 2 4 1 7 . 7 8 l 0 . 1 1 5 0 . 2 0 0 2 . 9 2 5 . 0 8 a 0 1 5 0 1 5 i n c h e s m i l l i m e t e r s a 1 e 1 e a l s e a t i n g p l a n e a 2 a b 1 b c n o t e : t h e c o n t r o l d i m e n s i o n i s t h e i n c h c o l u m n e b e a
x r 8 8 c 6 8 1 1 0 1 r e v . 2 . 1 1 n o t i c e e x a r c o r p o r a t i o n r e s e r v e s t h e r i g h t t o m a k e c h a n g e s t o t h e p r o d u c t s c o n t a i n e d i n t h i s p u b l i c a t i o n i n o r d e r t o i m - p r o v e d e s i g n , p e r f o r m a n c e o r r e l i a b i l i t y . e x a r c o r p o r a t i o n a s s u m e s n o r e s p o n s i b i l i t y f o r t h e u s e o f a n y c i r c u i t s d e - s c r i b e d h e r e i n , c o n v e y s n o l i c e n s e u n d e r a n y p a t e n t o r o t h e r r i g h t , a n d m a k e s n o r e p r e s e n t a t i o n t h a t t h e c i r c u i t s a r e f r e e o f p a t e n t i n f r i n g e m e n t . c h a r t s a n d s c h e d u l e s c o n t a i n e d h e r e i n a r e o n l y f o r i l l u s t r a t i o n p u r p o s e s a n d m a y v a r y d e p e n d i n g u p o n a u s e r ? s s p e c i f i c a p p l i c a t i o n . w h i l e t h e i n f o r m a t i o n i n t h i s p u b l i c a t i o n h a s b e e n c a r e f u l l y c h e c k e d ; n o r e s p o n s i b i l i t y , h o w e v e r , i s a s s u m e d f o r i n a c c u r a c i e s . e x a r c o r p o r a t i o n d o e s n o t r e c o m m e n d t h e u s e o f a n y o f i t s p r o d u c t s i n l i f e s u p p o r t a p p l i c a t i o n s w h e r e t h e f a i l u r e o r m a l f u n c t i o n o f t h e p r o d u c t c a n r e a s o n a b l y b e e x p e c t e d t o c a u s e f a i l u r e o f t h e l i f e s u p p o r t s y s t e m o r t o s i g n i f i c a n t l y a f f e c t i t s s a f e t y o r e f f e c t i v e n e s s . p r o d u c t s a r e n o t a u t h o r i z e d f o r u s e i n s u c h a p p l i c a t i o n s u n l e s s e x a r c o r p o r a t i o n r e c e i v e s , i n w r i t i n g , a s s u r a n c e s t o i t s s a t i s f a c t i o n t h a t : ( a ) t h e r i s k o f i n j u r y o r d a m a g e h a s b e e n m i n i m i z e d ; ( b ) t h e u s e r a s s u m e s a l l s u c h r i s k s ; ( c ) p o t e n t i a l l i a b i l i t y o f e x a r c o r p o r a t i o n i s a d e q u a t e l y p r o t e c t e d u n d e r t h e c i r c u m - s t a n c e s . c o p y r i g h t 2 0 0 6 e x a r c o r p o r a t i o n d a t a s h e e t j u n e 2 0 0 6 r e p r o d u c t i o n , i n p a r t o r w h o l e , w i t h o u t t h e p r i o r w r i t t e n c o n s e n t o f e x a r c o r p o r a t i o n i s p r o h i b i t e d . r e v i s i o n h i s t o r y f r o m r e v 2 . 1 0 t o 2 . 1 1 ( j u n e 2 0 0 6 ) c o r r e c t e d p i n o u t o n 2 8 - - p i n p d i p p a c k a g e o n p a g e 3 ( p i n 1 i s a 0 ) . a d d e d r e v i s i o n h i s t o r y .


▲Up To Search▲   

 
Price & Availability of XR88C681P40-F

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X